Bug 851072 - [Keyboard] Add cursor-swiping functionality to the Keyboard

Implement cursor-swiping like in http://sergimansilla.com/blog/swipeselection-in-an-afternoon using the new Virtual Keyboard/IME API (https://wiki.mozilla.org/WebAPI/KeboardIME).

Since there is a lot of whitespace changed, better look at the patch without whitespace: https://github.com/mozilla-b2g/gaia/pull/10742/files?w=1