Add binder calls to start and stop NAT64 prefix discovery.

Currently NAT64 prefix discovery, which runs in netd, is started
by netd itself when a network is programmed with all-IPv6 DNS
servers. Unfortunately this is not correct because in many cases
we program DNS servers before the network is connected and it's
actually possible to send packets to them.

In general netd does not have enough visibility into network
lifecycle management to decide when to start and stop prefix
discovery. So move it into the framework with the rest of the
464xlat control plane.

This CL removes the automatic start/stop of DNS64 prefix
discovery and adds binder IPCs for the framework to start and
stop it.

Bug: 65674744
Test: system/netd/tests/runtests.sh
Change-Id: I399c236505590690efa5ece3b75b5161a41fcb7d
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp
index 5bb5df0..dcf8e02 100644
--- a/server/NetdNativeService.cpp
+++ b/server/NetdNativeService.cpp
@@ -494,6 +494,20 @@
     return binder::Status::ok();
 }
 
+binder::Status NetdNativeService::resolverStartPrefix64Discovery(int32_t netId) {
+    // Locking happens in Dns64Configuration.
+    ENFORCE_NETWORK_STACK_PERMISSIONS();
+    gCtls->resolverCtrl.startPrefix64Discovery(netId);
+    return binder::Status::ok();
+}
+
+binder::Status NetdNativeService::resolverStopPrefix64Discovery(int32_t netId) {
+    // Locking happens in Dns64Configuration.
+    ENFORCE_NETWORK_STACK_PERMISSIONS();
+    gCtls->resolverCtrl.stopPrefix64Discovery(netId);
+    return binder::Status::ok();
+}
+
 binder::Status NetdNativeService::tetherApplyDnsInterfaces(bool *ret) {
     NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK);
     *ret = gCtls->tetherCtrl.applyDnsInterfaces();