statelessify matjaxutils

stateless-ification of function that was using module level
variable to share data.

Now varaible are passed around, and usage of replace math
require user to pass a return value of remove_math around
linting and remove unused var
patch header-cell and use-strict
add mising semicolon
Merge pull request #3598 from Carreau/statelessify-mjutil

Statelessify mathjaxutils

pass math as a variable, rather than instance attribute.

closes #3596