Delete dead code in res_comp.cpp and misc cleanups

No functionality changes, this is mostly meant to improve our code
coverage and cleanup our headers a bit.

 - delete dead functions res_ownok() and res_mailok()
 - Move prototypes of the remaining functions to the new header res_comp.h
 - Replace resolv_private.h with res_comp.h as needed
 - Drop the dependency on Bionic's <resolv.h> wherever possible
 - Eliminate the horrible maybe_XXX() macros
 - Make res_hnok() and res_dnok() return a proper bool instead of 0 and 1

Change-Id: Ic2e27753355d873925044a7561ccb78bd2c2d162
diff --git a/res_mkquery.cpp b/res_mkquery.cpp
index fb8a074..b95d31f 100644
--- a/res_mkquery.cpp
+++ b/res_mkquery.cpp
@@ -80,8 +80,11 @@
 #include <string.h>
 
 #include <android-base/logging.h>
+#include <netd_resolv/resolv.h>  // NET_CONTEXT_FLAG_USE_DNS_OVER_TLS
 
-#include "resolv_private.h"
+#include "res_comp.h"
+#include "res_debug.h"
+#include "resolv_private.h"  // res_state
 
 // Queries will be padded to a multiple of this length when EDNS0 is active.
 constexpr uint16_t kEdns0Padding = 128;