Fix handling of proxy classes in hidden_api.h

Inspecting proxy classes with reflection/JNI could result in an ART
crash because hiddenapi::detail::GetDexFlags() assumed that all classes
have a class def index and can be iterated over. This actually revealed
a more general issue with proxy classes.

This patch replaces a proxy method with the interface method at the
beginning of ShouldDenyAccessToMember. This takes care of all proxy
methods and will instead look at hidden API flags of the interface
methods. What's left is proxy fields - both synthetic implementation
details. Special case those and assign to greylist for now.

Bug: 124218696
Test: art/test.py -r -t 691-hiddenapi-proxy
Change-Id: I36c961cd4ffb196641db162818a0f9659aed8a32
diff --git a/test/knownfailures.json b/test/knownfailures.json
index cf6e69c..e4b3f59 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1088,6 +1088,7 @@
                   "679-locks",
                   "688-shared-library",
                   "690-hiddenapi-same-name-methods",
+                  "691-hiddenapi-proxy",
                   "999-redefine-hiddenapi",
                   "1000-non-moving-space-stress",
                   "1001-app-image-regions",