Add Functor and Applicative instances for GHC 7.10 compatibility

Tested with GHC 7.6.3, 7.8.3, HEAD. Note that alex's dependencies currently need to be installed with `--allow-newer`.

These instances could be perhaps made more efficient (especially fmap), but as they aren't used anywhere (yet), it doesn't really matter (yet).