Lift a given grammar to Template Haskell and replace recursion and loops with
infinite-tree style recursive calls to the grammar itself. This allows GHC to do
a much better optimization (x20 speed-ups in one realistic test, compared with
result of liftGrammar).