Reset equation numbers on every output code update

There is an issue in the application that causes the equation
numbers to increment on every edit. A simple way to reproduce
this issue is to enter the following code in the input form.

    \begin{equation}
    1 + 1 = 2
    \end{equation}

This equation would be numbered (1) initially. Now, for every
edit made, the number against this equation would keep
incrementing. This happens because MathJax uses an internal
equation number counter to number every new equation that is
rendered unless this counter is reset. Fix this issue by
resetting the equation numbers on every code update.