Rewrite the parser

Summary:
Make our own parser that doesn't use jison, so that we can handle
funny TeX syntax, and to make it smaller.

Test Plan: Make sure the tests pass with the new parser.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D3029