enable instrumentation mode to run UI Automator tests

This adds a set of parameters to UiAutomatorTest so that it can
drive instrumentation based UI tests. Some refactoring is done
so that the test runner can be swapped when running in
instrumentation mode.

This does not support full feature set of instrumentation based
runners, and is only for transitition period. A better featured
InstrumentationTest based UI test driver will be the eventual
solution.

Bug: 8112605
Change-Id: I02ca758b673ba515b3be7397c1e616268ea4502b
1 file changed