Fixes#1047
This resets the IME state only if we were previously in a composing
state. I did not realize that IME state also included non-composing
state that we want to preserve, such as the next quotation direction
in the case of chinese. i.e. `“` vs `”`.
I'm not fully sure that this is the right logic, but previous pre-edit
states such as in Japanese appear to still work and this fixes Chinese
quotation marks.