ResourceLoader: Add structure test for foreign-resources.yaml
Enable the equivalent of running manageForeignResources.php verify
as a structure test via PHPUnit.
Related cleanups for this to work well:
- Improve cache key readability before enabling in CI.
- Document how we do caching in CI.
- Change some exceptions to errors so that we don't stop on the first error, thus improving the usefulness of the CI result by telling the developer all mismatches instead of only the first.
- Fix incorrect typehint for nullable $integrity.
Bug: T203694
Change-Id: I8aeffc1f2e81ffcf037977528f94c00995791999