This patch eagerly constructs and modifies CompilerInvocation of modular dependencies in order to report the correct context hash instead of the hash of the original translation unit.
No functionality change here, since we currently don't modify CompilerInvocation in a way that affects the context hash.
Depends on D102473.
It'd be nice to remove this API separately in a follow up patch; the change to CompilerInstance.h is not necessary here so it's easy to split, focusing the patch on the relevant changes, and that pattern is easier for reverting (especially in out-of-tree code).