Extensions

This datatype is a copy of the one in Cabal's Language.Haskell.Extension module.
The intention is to eventually import it from Cabal, but we need to wait for
the next release of Cabal which includes XmlSyntax and RegularPatterns.

Certain extensions imply other extensions, and this function
makes the implication explicit. This also handles deprecated
extensions, which imply their replacements.
The returned valued is the transitive closure of implied
extensions.