cache the epsilon closure of NFA states

* for most parsers most time is spent generating the lexing DFA
* things get much faster with this commit (2s to 1.2s for the test
  suite on my machine)