[lexer] Fix more memory leaks in lexer and simplify.
[lexer] Fix more memory leaks in lexer and simplify.

IanFinlayson/tetra,IanFinlayson/tetra,IanFinlayson/tetra,IanFinlayson/tetra,IanFinlayson/tetra,IanFinlayson/tetra