installd: Unit test for RunDex2oat

Add unit tests run_dex2oat_test.

In order to make RunDex2oat testable,
 - RunDex2Oat is extracted from dexopt.cpp such that the class is
   visible to test
 - ExecVHelper is extracted from dexopt.cpp such that it can be used by
   RunDex2Oat and the others in the original file.
 - Main logic of RunDex2Oat is removed from constructor (otherwise
   virtual functions can't be overridden in derived class).

Bug: 161470356
Test: atest run_dex2oat_test
Test: atest frameworks/native/cmds/installd/tests
Test: cmd package compile -m speed -f com.android.egg

Change-Id: I416d57a008374a598def9160b65407ed043ab0eb
diff --git a/cmds/installd/TEST_MAPPING b/cmds/installd/TEST_MAPPING
index c6583a1..3f0fb6d 100644
--- a/cmds/installd/TEST_MAPPING
+++ b/cmds/installd/TEST_MAPPING
@@ -15,6 +15,9 @@
     {
       "name": "installd_utils_test"
     },
+    {
+      "name": "run_dex2oat_test"
+    },
     // AdoptableHostTest moves packages, part of which is handled by installd
     {
       "name": "AdoptableHostTest"