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
lint
Allow terms with degree > 1 to be defined without using a hash
Merge remote-tracking branch 'upstream/master' into sim-rat-exp-1
Multiplying fractions exercise
Multiplying two decimals exercise
Add negative decimals
Don't bothered multiplying by a leading 0
Align hints correctly
Avoid decimals with trailing zeros
Add percentage exercise
Repeating decimals exercise
Use "hint", not "step" terminology

Summary: Beth explained that this is more appropriate for the humanities, and it doesn't seem any worse for math.

Reviewers: eater, elizabeth

Reviewed By: elizabeth

CC: elizabeth

Differential Revision: http://phabricator.khanacademy.org/D3276
Better escaping for TeX resulting from user-entered input.

Test Plan:
Tested on localhost, works the same.

Auditors: alpert
Avoid expressions and simplify too much
Sort out all the merges of rational-expression.js
Update unit tests
factor function renamed getTermsGCD
Make texCleanup always return this

Summary: Since cleanupMath checks if MathJax is `null`, we don't need to
check manually, and now we'll always return `this`, which was causing
some issues.

Auditors: alpert
Make non-latex labels work

Auditors: alpert