Expanded the nested regex test case.

Minor cleanup.
Begin transition to lexer goroutine.

This breaks nex programs that have nested regexes containing return statements
in their actions.

I simplified the generated code. Instead of maintaining a stack of states for
each level of nesting, we use Go functions instead, and let the language take
care of it.

However, return statements in the actions will destroy this state. My original
solution was to maintain my own stack that was preserved between calls to the
lexer. I now intend to solve this problem by running the lexer in its own
goroutine.
Run scanner in its own goroutine.

To support return statements in actions, we still must maintain a call stack.
However, the generated code is simpler than before, and more closely resembles
the source.
Refactored generated code.
Combine some tests to speed up nex_test slightly.
Patterns that match the beginning and end of input.
Fixed parsing of parentheses.

Added support for $ anchor.

Parses ^ anchor, but does nothing with it.