Add InetAddressCompat

Although the InetAddress symbols used by Connectivity are stable core
platform API, and should be usable, the core_current stubs are not yet
part of the module_current API.
Until that is fixed, add an InetAddressCompat utility that calls the
three static methods by reflection.

Test: atest FrameworksNetTests CtsNetTestCases
Bug: 183097033
Change-Id: I797009aeff1d39ae2dc06ef69d2e235689b43c89
diff --git a/framework/src/android/net/ConnectivityManager.java b/framework/src/android/net/ConnectivityManager.java
index a621233..dcb80e6 100644
--- a/framework/src/android/net/ConnectivityManager.java
+++ b/framework/src/android/net/ConnectivityManager.java
@@ -4639,7 +4639,7 @@
                 Log.e(TAG, "Can't set proxy properties", e);
             }
             // Must flush DNS cache as new network may have different DNS resolutions.
-            InetAddress.clearDnsCache();
+            InetAddressCompat.clearDnsCache();
             // Must flush socket pool as idle sockets will be bound to previous network and may
             // cause subsequent fetches to be performed on old network.
             NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();