Draft: Remove (most) DynFlags from HsToCore (#17957)
Progress towards #17957. Remove direct use of DynFlags from HsToCore. Instead we go through configuration data structures (DsOpts, etc.). We still initialize these data structures from DynFlags stored in the TcRnIf top level environment. This could be changed in the future.