More robust handling of the math squirelling

A few things happening here.

1. No need to look up the id of the math item you want the jax for, getJaxFor
also work if you pass the element itself.

2. No need to check if Mathjax is defined in the callback. This method is called
as callback to Typeset, if MathJax wasn't defined we'd never reach this code.

3. If somehow the callback is called despite the jax still being MIA, log the
error and continue. This is better than breaking all math functionality.
Merge branch 'math-fixes-20130812' into testing