Updates to support base-4.7 from GHC 7.7-2013116

Adds updates to support the new Typeable in base-4.7.0.0. 
Switches from MonadCatchIO-mtl to MonadCatchIO-transformers (latter is supported in 7.8)
Adds explicit (Functor m) constraint on tryCGI (this is the only source change not in #if MIN_VERSION_base(4,7,0) blocks).