Bug 902562 - Expose new InputMethod API to desktop helper

Part 1 of [bug 902562](https://bugzilla.mozilla.org/show_bug.cgi?id=902562).