bionic: Replace iface with opaque netid in resolver.

Replace iface cache key with netid.

Replace _mark with netid.

Mark sockets used to test IPv4/IPv6 support as well as sockets
used to determine source address for rfc6724 sort.

Remove pid/uid mappings (functionality moved to system/netd).

Do not create resolv_cache when it does not exist, but rather only
when DNS configuration is supplied.

Clean up unused functions.

Change-Id: I9ccfda2902cc0943e87c9bc346ad9a2578accdab
diff --git a/libc/dns/include/resolv_private.h b/libc/dns/include/resolv_private.h
index c7bcb89..8914fae 100644
--- a/libc/dns/include/resolv_private.h
+++ b/libc/dns/include/resolv_private.h
@@ -142,7 +142,7 @@
 struct __res_state_ext;
 
 struct __res_state {
-	char	iface[IF_NAMESIZE+1];
+	unsigned	netid;			/* NetId: cache key and socket mark */
 	int	retrans;	 	/* retransmission time interval */
 	int	retry;			/* number of times to retransmit */
 #ifdef sun
@@ -175,7 +175,7 @@
 	res_send_qhook qhook;		/* query hook */
 	res_send_rhook rhook;		/* response hook */
 	int	res_h_errno;		/* last one set for this context */
-	int _mark;          /* If non-0 SET_MARK to _mark on all request sockets */
+	unsigned _mark;			/* If non-0 SET_MARK to _mark on all request sockets */
 	int	_vcsock;		/* PRIVATE: for res_send VC i/o */
 	u_int	_flags;			/* PRIVATE: see below */
 	u_int	_pad;			/* make _u 64 bit aligned */
@@ -490,8 +490,8 @@
 int		res_getservers(res_state,
 				    union res_sockaddr_union *, int);
 
-void res_setiface();
-void res_setmark();
+void res_setnetid(res_state, unsigned);
+void res_setmark(res_state, unsigned);
 u_int  res_randomid(void);
 
 __END_DECLS