[Git][ghc/ghc][wip/sol/driver-diagnostics] 3 commits: Respect `-fdiagnostics-as-json` for core diagnostics (see #24113)