webapp/mathjax: corner case: reset $-match counting in case of newline
webapp/mathjax: corner case: reset $-match counting in case of newline

tscholl2/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,DrXyzzy/smc,sagemathinc/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc