Memoize string parsers.

Previously, we would create a new parser every time it was called, which
can lead to performance problems in some situations.
Memoize any type-based parsers we create.

They are pretty simple, but they have a tendency to get created in a lot
of different places so let's stick them in a little map just in case.
There can never be *too* many of them, since they have to be based on an
actual type.
Add functions to `Traversable`.

Haskell has useful folds that expect at least one member in the
collection, but these are missing in Scala. Add these as implicit
members.
New methods for finding longest token.

These are a set of functions called `longest` or `longestString` that
take in a collection of possible constant tokens and create a lexer that
will match the longest of the group. These are designed to be as cheap
as possible at match time, so they are best reused.

The Scala parser library has a longest-match combinator (`|||`) but
it is designed for dynamic matching and must exhaustively try every
candidate. **These functions only operate on tokens that can be
represented as constant strings.**
Improve timer accuracy & readability.
Fix up some trailing whitespace.
Clean up and refactor type utilities.
Generalize the separated-repeat parsers.