Increase coverage of libartpalette-system native API.

- Call PaletteAshmemCreateRegion and PaletteAshmemSetProtRegion, which
  don't get exercised on memfd capable kernels.

- Call PaletteNotify{Begin,End}JniInvocation regardless of what the
  ShouldReport gate function says. Start a VM to give them a valid
  JNIEnv argument.

- Add a CTS test to run dex2oat with a new special flag to make it call
  PaletteNotify{Start,End}Dex2oatCompilation regardless of what the
  ShouldReport gate function says. This way they get valid fd's for the
  oat and vdex files.

Test: m cts cts-tradefed
      cts-tradefed run commandAndExit cts \
        --module art_standalone_dex2oat_cts_tests
      cts-tradefed run commandAndExit cts \
        --module art_standalone_libartpalette_tests
  with log messages in the hook functions in palette_android_partner.cc
  to verify that they are called.
Test: art/tools/run-gtests.sh \
        /apex/com.android.art/bin/art/{x86,x86_64}/art_libartpalette_tests
  in device chroot test environment
Test: m test-art-host-gtest-art_libartpalette_tests
Bug: 206657952
Change-Id: I91f3182f15d234dbaca2a4357442efd2e957373f
diff --git a/libartpalette/Android.bp b/libartpalette/Android.bp
index 51a9dab..1516ec6 100644
--- a/libartpalette/Android.bp
+++ b/libartpalette/Android.bp
@@ -122,7 +122,10 @@
 art_cc_defaults {
     name: "art_libartpalette_tests_defaults",
     srcs: ["apex/palette_test.cc"],
-    shared_libs: ["libartpalette"],
+    shared_libs: [
+        "libartpalette",
+        "libnativehelper",
+    ],
 }
 
 // Version of ART gtest `art_libartpalette_tests` bundled with the ART APEX on target.