Shared lowering/cache/mirror logic used by the trust-rustc
(RUSTC_WRAPPER) and trust-rustdoc (RUSTDOC) shims.
Both wrappers do the same job: given a rustc/rustdoc invocation, find
the input .rs file, and — if it's strict-marked — lower the whole
source tree into a temp directory keyed by an FNV-1a content hash, then
rewrite the input path so the underlying tool sees plain Rust.
The functions here are the parts that don't depend on whether we're
about to exec rustc or rustdoc. The two main.rs files differ only
in how they parse out the tool path / input arg.