createRepoCachesForBuild unconditionally overwrote whatever diagnostic
context repo_sources.createCaches already set (e.g. a specific repo
name and "failed to initialize repository cache") with a generic
"config"/"failed to create repo caches from config", inconsistent with
mapBuildCacheError's guarded pattern elsewhere in this file. Guarded it
the same way.
Also fixed three bugs in repo_sources.zig's loadTrustedFingerprints:
- The mere.pub fingerprint string was orphaned if the subsequent
fingerprints.append() call failed (OOM) before it was added to the
list the function's own errdefer cleans up. - Same leak pattern for a trusted.kdl fingerprint entry's dupe-then-append.
- The trusted.kdl content buffer was freed by both an errdefer
registered right after allocating it and a second, redundant
unconditional defer registered later - any error after the second
defer double-freed it.
Also fixed test_helpers.createTestRepoConfig, which referenced a
nonexistent .ctx field on RepoConfig - needed for the new
createRepoCachesForBuild test.