Enable optimisation and cover GHC bug.

There is a bug[1] in SpecConstr in GHC <=7.8 which causes an
infinite loop when compiling with -O2. The workaround is
simply to compile with -fno-spec-constr.

[1]: http://ghc.haskell.org/trac/ghc/ticket/5550
Move to strict data structures.

* Use strict fields.

* Prefer 'Text' to 'String' and 'Vector' to list.

* Add 'NameMap' using 'IntMap' instead of 'Map Name'.