Add Functor and Applicative instances for GHC 7.10 compatibility

Commit 91b2b40136a77252617e50adeffdca7c5978337e added these to
the code generated by Alex, but not to Alex itself.
Merge pull request #49 from rwbarton/master

Add Functor and Applicative instances for GHC 7.10 compatibility