Cleanup patchset

The codebase of Happy is old (some pieces remained untouched since 1996), and there are some obvious improvements to be done.

Nothing really new was introduced, the code was merely refactored without any semantic changes. Some legacy functions removed, some rewritten for improved readability.

Custom solutions were replaced by the ones from libraries, no new dependencies introduced (thought using the `dlist` package sounds like a good idea, what do you think?). There were some really silly things, too (such as `zip [0..length xs - 1] xs` instead of `zip [0..] xs]`).

I deprecated the `small_base` cabal flag, because base <= 3.0 isn't even on Hackage (it was more than 5 years ago).

All tests pass. Also, the AMP warnings are gone (with the removal of ParseMonad) so the code won't break on GHC 7.10, and there are minor performance improvements.

There's a lot more to be done, but those are the first steps to make this code a little more comprehensible.