This exposes template-haskell functions for querying the language extensions which are enabled when compiling a module,
- an isExtEnabled function to check whether an extension is enabled
- an extsEnabled function to obtain a full list of enabled extensions
To avoid code duplication this adds a GHC.LanguageExtensions module to ghc-boot and moves DynFlags.ExtensionFlag into it. A happy consequence of this is that the ungainly DynFlags lost around 500 lines. Moreover, flags corresponding to language extensions are now clearly distinguished from other flags due to the LangExt.* prefix.
This fixes Trac #10820.