Added the code-gen end for math mode

The code generation stage for math mode is quite simple and
it merely recursively travels down the AST handing a StringBuilder
off to each successive node to append to.

Also in this commit are tests for the code-gen stage.