Change token structure of template literals

Fix various template parsing issues, makes tokenizer useable from outside
the parser.

Closes #169
Closes #173
Make loose parser parse template strings