[Modules] Enrich diags for out of date module dependencies (#190203)
Replace the opaque `ErrorStr` parameter in `ModuleManager::addModule`
with a structured object that carries specific information for
reporting. This allows the diagnostics to emit targeted notes instead of
a single error string appended to the main diagnostic. Information that
is relevant but is tied to implementation details of the compilation is
reported as notes (e.g. signature mismatches)
This patch additionally
* Adds minor comments to places I found unintuitive
* Adds a contrived test case for signature mismatches
* Sets `InputFilesValidation` based on module kind at construction