Import UTF-8 and runestring functions from plan9port.

Use an older version that only handles 16-bit runes, as that is all that
is needed for Javascript.
Rename AST free-list.
Save line number where the token starts for improved error messages.
Rewrite lexer to use a proper lookahead token.

Easier to understand, and in preparation for reading UTF-8.