catch MathJax processing errors and throw a Numbas error

Stop the exam if there's a MathJax processing error.
Should make it easier to check for problems before deploying a test.
Merge branch 'master' of github.com:numbas/Numbas