Optimize token type branching in lex()

before x 70,844 ops/sec ±0.68% (99 runs sampled)
after x 108,854 ops/sec ±0.50% (93 runs sampled)
Optimize for the common case where a string is valid

before x 108,854 ops/sec ±0.50% (93 runs sampled)
after x 129,460 ops/sec ±0.42% (101 runs sampled)