Fix unicode in Selendroid

1. Move IME code to `android-common` so it is available to Selendroid
2. Only encode text if Unicode keyboard is requested
3. Fix error in handling of unsetting Unicode keyboard in Selendroid
4. Add keyboard tests

Should (finally) fix #3435