TeX Reader: Improved error messages

This patch changes how the TeX reader works in order to improve error messages. Previously the reader would parse a command and then check to see if the command was valid LaTeX, now the reader will only parse valid TeX commands which provides an accurate position of where the error might be.

This may be catastrophic for performance but it didn't seem too bad from my simple tests. I don't know if you can get some sort of Trie like parsing structure in parsec.