Bug 1053647: delete space when reverting an autocorrection and don't insert space when user selects a word suggestion

disable autocorrection when reverting a selected word suggestion
Bug 1053647 - fix the failing python integration tests.
Merge pull request #23343 from RudyLu/keyboard/Bug1053647

Bug 1053647 - [Keyboard] Auto correct improvement.
r=rudylu.