DynFlags: Don't list TemplateHaskell as supported if it's not
DynFlags: Don't list TemplateHaskell as supported if it's not

`-XTemplateHaskell` requires GHCi; don't show it in
`--supported-extensions` if it's not supported.

Together with https://github.com/haskell/cabal/issues/2644
this allows to finally fix a long-standing annoyance in cabal
of not being able to detect availability of TH in build-plans.

Fixes #11102

See also https://github.com/haskell/cabal/pull/2930 which provides
emulation of this feature for older GHCs.

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D1484

sgillespie/ghc,sdiehl/ghc,ezyang/ghc,tjakway/ghcjvm,gridaphobe/ghc,shlevy/ghc,olsner/ghc,snoyberg/ghc,nushio3/ghc,vTurbine/ghc,vTurbine/ghc,vikraman/ghc,mettekou/ghc,elieux/ghc,olsner/ghc,snoyberg/ghc,vikraman/ghc,oldmanmike/ghc,vTurbine/ghc,oldmanmike/ghc,mettekou/ghc,tjakway/ghcjvm,sgillespie/ghc,sdiehl/ghc,shlevy/ghc,GaloisInc/halvm-ghc,mcschroeder/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,nushio3/ghc,oldmanmike/ghc,ezyang/ghc,mcschroeder/ghc,vikraman/ghc,shlevy/ghc,gridaphobe/ghc,shlevy/ghc,mcschroeder/ghc,sgillespie/ghc,vikraman/ghc,snoyberg/ghc,olsner/ghc,vTurbine/ghc,oldmanmike/ghc,mcschroeder/ghc,oldmanmike/ghc,sdiehl/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,vikraman/ghc,vTurbine/ghc,oldmanmike/ghc,oldmanmike/ghc,nushio3/ghc,gridaphobe/ghc,gridaphobe/ghc,vTurbine/ghc,shlevy/ghc,nushio3/ghc,vikraman/ghc,ezyang/ghc,sgillespie/ghc,vikraman/ghc,tjakway/ghcjvm,mcschroeder/ghc,ezyang/ghc,mettekou/ghc,tjakway/ghcjvm,sgillespie/ghc,snoyberg/ghc,nushio3/ghc,GaloisInc/halvm-ghc,mettekou/ghc,sgillespie/ghc,sdiehl/ghc,elieux/ghc,vTurbine/ghc,tjakway/ghcjvm,mettekou/ghc,mettekou/ghc,mettekou/ghc,snoyberg/ghc,tjakway/ghcjvm,gridaphobe/ghc,snoyberg/ghc,elieux/ghc,nushio3/ghc,GaloisInc/halvm-ghc,elieux/ghc,gridaphobe/ghc,shlevy/ghc,olsner/ghc,nushio3/ghc,mcschroeder/ghc,sdiehl/ghc,ezyang/ghc,olsner/ghc,gridaphobe/ghc,olsner/ghc,snoyberg/ghc,elieux/ghc,elieux/ghc,sdiehl/ghc,shlevy/ghc,elieux/ghc,ezyang/ghc,ezyang/ghc,tjakway/ghcjvm,mcschroeder/ghc,sdiehl/ghc,olsner/ghc,GaloisInc/halvm-ghc