More compact Thompson's construction for Kleene.

Instead of adding NFA states, the states are modified in-place.
Squash alternation and concatenation ASTs.

Instead of having nested binary ASTs, combine children of the same type with
the parent object. This also allows for the construction of more compact NFAs.
Number states at automaton creation.

This creates consistent numbering of states between the minimized DFA and the
generated scanner and simplifies state traversal code in a few places.