[rst] `cm.getModeAt` fix for mode

The `cm.getModeAt` method was failing for `rst`. Commit ae2e64c ensures that `rst` mode reports correct `innerMode` (`stex`, `python` or `undefined` *if no inner mode for current state*). And commit d6ebcc1 enables `CodeMirror.innerMode` to deal with the latter most case.