Split NetworkStackUtils to frameworks/libs/net

Split DeviceConfig and collections-related utilities to CollectionUtils
and DeviceConfigUtils in frameworks/libs/net.

Also add implementations for contains(array, value), to avoid usage of
internal non-API utils.

The original tests are based on mockito-extended, so also add to
NetworkStackTests as a dependency. This also requires setting the test
app as debuggable in its manifest.

Bug: 17454103
Test: atest NetworkStaticLibTests
Change-Id: Ie9bed66a08b7370ebe50d0a7240b788f8b31aa77
diff --git a/staticlibs/tests/unit/Android.bp b/staticlibs/tests/unit/Android.bp
index 537340e..c00202e 100644
--- a/staticlibs/tests/unit/Android.bp
+++ b/staticlibs/tests/unit/Android.bp
@@ -9,6 +9,7 @@
     static_libs: [
         "net-utils-framework-common",
         "androidx.test.rules",
+        "mockito-target-extended-minus-junit4",
         "net-utils-device-common",
         "net-tests-utils-host-device-common",
     ],
@@ -29,6 +30,11 @@
     static_libs: [
         "NetworkStaticLibTestsLib",
     ],
+    jni_libs: [
+        // For mockito extended
+        "libdexmakerjvmtiagent",
+        "libstaticjvmtiagent",
+    ],
     jarjar_rules: "jarjar-rules.txt",
     test_suites: ["device-tests"],
 }