Support for API exemptions from API blacklisting.

Add support to VMRuntime for setting a list of exemptions from the hidden
API enforcement. The list is used as a prefix match against the signature
of a field/method. Any signatures that match are treated as being on the
light grey list, rather than the dark grey list or blacklist.

Refactor some code in hidden_api.h that deals with field/method signatures,
to encapsulate the signature in a new class MemberSignature. This allows us
to avoid building the entire signature in member, instead just using its
constituent parts.

Test: $ make test-art-host-gtest-hidden_api_test
Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Id608743d1b5a7a37059875d8991d0d4d65f5fc36
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index 8681642..b342abe 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -37,6 +37,7 @@
   ExceptionHandle \
   GetMethodSignature \
   HiddenApi \
+  HiddenApiSignatures \
   ImageLayoutA \
   ImageLayoutB \
   IMTA \
@@ -160,6 +161,7 @@
 ART_GTEST_dex2oat_image_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS) Statics VerifierDeps
 ART_GTEST_exception_test_DEX_DEPS := ExceptionHandle
 ART_GTEST_hiddenapi_test_DEX_DEPS := HiddenApi
+ART_GTEST_hidden_api_test_DEX_DEPS := HiddenApiSignatures
 ART_GTEST_image_test_DEX_DEPS := ImageLayoutA ImageLayoutB DefaultMethods
 ART_GTEST_imtable_test_DEX_DEPS := IMTA IMTB
 ART_GTEST_instrumentation_test_DEX_DEPS := Instrumentation