Merge PrivateDnsConfiguration and qhook into libnetd_resolv

PrivateDnsConfiguration handles the operations which adds, validates,
and removes private DNS servers. It will be hidden inside the library
after this change.

PrivateDnsConfiguration and DnsTlsDispatcher will be constructed along
with netd starts. Their instances are now moved to the library. Netd
can use public functions to update private DNS servers. In addition,
qhook() is no longer needed for TLS query.

This change comprises:

[1] Provide APIs for netd to add and delete private DNS servers as
    well as get status.

[2] Provide a way for netd to register callback which will be invoked
    whenever private DNS servers validation finishes. This is used for
    onPrivateDnsValidationEvent().

[3] Remove qhook in android_net_context, since DnsTls* have been moved
    to libnetd_resolv library. Also, qhook and rhook are removed in the
    library.

[4] The visibility of DnsTls* symbols are hidden, while they have been
    visible for a while.

Bug: 113628807
Test: as follows
    - built, flashed, booted
    - system/netd/tests/runtests.sh
    - DNS-over-TLS in live network passed

Change-Id: I235004e4019d88d0d162d7ebd452148cd14cfd39
diff --git a/resolv/include/netd_resolv/params.h b/resolv/include/netd_resolv/params.h
index c3f3363..939bfc4 100644
--- a/resolv/include/netd_resolv/params.h
+++ b/resolv/include/netd_resolv/params.h
@@ -36,17 +36,12 @@
     int base_timeout_msec;      // base query retry timeout (if 0, use RES_TIMEOUT)
 };
 
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact;
+// The DNS over TLS mode on a specific netId.
+enum class PrivateDnsMode : uint8_t { OFF, OPPORTUNISTIC, STRICT };
 
-typedef res_sendhookact (*res_send_qhook)(struct sockaddr* const*, const uint8_t**, int*, uint8_t*,
-                                          int, int*);
-
-typedef res_sendhookact (*res_send_rhook)(const struct sockaddr*, const uint8_t*, int, uint8_t*,
-                                          int, int*);
+// Validation status of a DNS over TLS server (on a specific netId).
+enum class Validation : uint8_t { in_process, success, fail, unknown_server, unknown_netid };
 
 #define LIBNETD_RESOLV_PUBLIC extern "C" [[gnu::visibility("default")]]
 
-// TODO: Remove it after we move PrivateDnsConfiguration and qhook() into libnetd_resolv.
-#define LIBNETD_RESOLV_TLS_EXPORT [[gnu::visibility("default")]]
-
 #endif  // NETD_RESOLV_PARAMS_H