test(all): port all tests over from the KaTeX.js project

Port all tests from the KaTeX.js project verbatim, implement some updates to katex lib based on recent KaTeX.js commits.

Closes #3