Build a parse tree before compiling

Separate tokenization and parsing into two discrete steps. The scanner
reads a stream of characters and outputs a stream of tokens, which are
then consumed by the parser, which in turn outputs a tree representing
the structure of the Curly template.