api-digester: Emit JSON errors during diagnose-sdk
The diagnostic consumers for swift-api-digester -diagnose-sdk were being set up after JSON files were read in, so errors in those files were silently dropped. In at least one case this led to a crash with no hint about what was happening. Set up the diagnostic consumer before doing any serious work to avoid this problem.
Fixing this required me to make `newCompilerInstance()` copy diagnostic consumers to the new instance’s diagnostic engine, since compiler instances were now being created after the consumers were added instead of before. I also had to make FilteringDiagnosticConsumer filter out clang warnings, remarks, and notes since those were now being emitted early enough to register in the digester.