Catch java.lang.SecurityException in activity launch
Make isSoftKeyboardPresent correctly detect keyboards with no UI

appium/appium#3884
appium/appium#3903