Add a basic test case to the new instrumentation test

However, due to the hard limit (60s) on the timeout during the
presubmit, the test is registered as a postsubmit test for now.

Also implement some helper methods and classes to make writing tests
easy.

Bug: 203483081
Test: atest MicrodroidTestApp
Change-Id: Ic07d776aff5f56421fc43a103a5b54b4a62b451f
diff --git a/tests/testapk/AndroidManifest.xml b/tests/testapk/AndroidManifest.xml
index 21abeb5..bc955d2 100644
--- a/tests/testapk/AndroidManifest.xml
+++ b/tests/testapk/AndroidManifest.xml
@@ -15,8 +15,9 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.android.microdroid.test">
+    <uses-permission android:name="android.permission.MANAGE_VIRTUAL_MACHINE" />
     <application>
-        <uses-library android:name="android.system.virtualmachine" android:required="true" />
+        <uses-library android:name="android.system.virtualmachine" android:required="false" />
     </application>
     <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="com.android.microdroid.test"