IM fixes
Some fixes for IM:
- Fix ClutterText delete-surrounding, and improve facilitating the surrounding text to the IM
- Ensure focus changes trigger an IM reset in between
- Improve the "button press triggers IM reset" feature some IMs rely on to commit the unfinished preedit_string.
Fixes: #1961 (closed) Fixes: #2030 (closed)