Fix app not responding

I tested with this apk and it works.
https://github.com/appium/app_not_responding

Fix #1668

When testing on Android an app may become unresponsive or crash. This generates a system dialog that breaks tests. With this change, these dialogs are automatically dismissed. This is similar to how Google handles their Espresso tests.