If a :reload finds syntax errors in the module graph, remove the loaded modules. (Fixes #17549)
The processing in compiler/main/GhcMake.hs
computes the ModuleGraph. If it finds errors
in the module header or in the import specifications, then the new module graph is
incomplete and should not be used.
The code before #17549 (closed) just reported the errors and left the old ModuleGraph in place.
The new code of this MR replaces the old ModuleGraph with an empty one.