Bug 1027670 - Add IME that handle LaTeX

Notice here, you're making `compositeKey.length - numberSpaceBack`.

`numberSpaceBack` can be on of:
  * `compositeKey.length - match[0].length`
  * `compositeKey.length - compositeKey.search('{') - 1`
  * `compositeKey.length - match.index`

All of them involving `compositeKey.length` so you can rename `numberSpaceBack` as `cursorOffset` and remove `compositeKey.length` from your computations.