Bug 1027670 - Add IME that handle LaTeX

A switch with only one case is a little bit weird. Refactor to a conditional, please.

I'm not sure if this is the best way to identify the last LaTeX command. you could have checked if `textbeforeCursor` matches `/\\\w+$/i` to check if you are at the end of a LaTeX command. If not, your `backspaceSize` is 1, if it is, the size is the length of the matching.