Make khan-exercises use KaTeX before MathJax

Summary:
Replace uses of raw MathJax calls with a wrapper that attempts to
render things with KaTeX (because it's much faster) before falling back to
MathJax. The main tmpl tex functions have been replaced with calls to this, so
there shouldn't be any funny MathJax business any more.

Test Plan:
Make sure math renders. Make sure that different answer types render
math correctly (especially radio). Make sure that graphie labels work properly.
Make sure that things that update math (like solutions_to_quadratic_equations)
work properly.

Reviewers: alpert, eater

Reviewed By: alpert

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