Expose DNS timeout error to netd

For resolver stats, RCODE_TIMEOUT has been used for catching DNS timeout
error. This change adds the Support for reporting NETD_RESOLV_TIMEOUT to
frameworks.

Also clean up res_data.cpp as these functions are not used.
  - res_init
  - res_mkquery
  - res_query
  - res_send
  - res_search

Bug: 113916551
Test: as follows
    - built and flash netd
    - system/netd/tests/runtests.sh passed
    - silently drop packets by iptables, the return error is correct
Change-Id: I62ba6759b519d42aef62ae5b756a3c1ae3cb00d8
diff --git a/resolv/include/netd_resolv/resolv.h b/resolv/include/netd_resolv/resolv.h
index 9176996..981340a 100644
--- a/resolv/include/netd_resolv/resolv.h
+++ b/resolv/include/netd_resolv/resolv.h
@@ -53,6 +53,13 @@
  */
 #define MARK_UNSET 0u
 
+/*
+ * Error code extending EAI_* codes defined in bionic/libc/include/netdb.h.
+ * This error code, including EAI_*, returned from android_getaddrinfofornetcontext()
+ * and android_gethostbynamefornetcontext() are used for DNS metrics.
+ */
+#define NETD_RESOLV_TIMEOUT 255  // consistent with RCODE_TIMEOUT
+
 struct __res_params;
 struct addrinfo;
 struct hostent;