REORG: dns: dns_option structure, storage of hostname_dn

This patch introduces a some re-organisation around the DNS code in
HAProxy.

1. make the dns_* functions less dependent on 'struct server' and 'struct resolution'.

With this in mind, the following changes were performed:
- 'struct dns_options' has been removed from 'struct resolution' (well,
  we might need it back at some point later, we'll see)
  ==> we'll use the 'struct dns_options' from the owner of the resolution
- dns_get_ip_from_response(): takes a 'struct dns_options' instead of
  'struct resolution'
  ==> so the caller can pass its own dns options to get the most
      appropriate IP from the response
- dns_process_resolve(): struct dns_option is deduced from new
  resolution->requester_type parameter

2. add hostname_dn and hostname_dn_len into struct server

In order to avoid recomputing a server's hostname into its domain name
format (and use a trash buffer to store the result), it is safer to
compute it once at configuration parsing and to store it into the struct
server.
In the mean time, the struct resolution linked to the server doesn't
need anymore to store the hostname in domain name format. A simple
pointer to the server one will make the trick.

The function srv_alloc_dns_resolution() properly manages everything for
us: memory allocation, pointer updates, etc...

3. move resolvers pointer into struct server

This patch makes the pointer to struct dns_resolvers from struct
dns_resolution obsolete.
Purpose is to make the resolution as "neutral" as possible and since the
requester is already linked to the resolvers, then we don't need this
information anymore in the resolution itself.
diff --git a/include/types/dns.h b/include/types/dns.h
index f28398d..c86eb4d 100644
--- a/include/types/dns.h
+++ b/include/types/dns.h
@@ -218,7 +218,6 @@
  */
 struct dns_resolution {
 	struct list list;		/* resolution list */
-	struct dns_resolvers *resolvers;	/* resolvers section associated to this resolution */
 	void *requester;		/* owner of this name resolution */
 	int (*requester_cb)(struct dns_resolution *, struct dns_nameserver *, struct dns_response_packet *);
 					/* requester callback for valid response */
@@ -226,7 +225,6 @@
 					/* requester callback, for error management */
 	char *hostname_dn;		/* server hostname in domain name label format */
 	int hostname_dn_len;		/* server domain name label len */
-	struct dns_options *opts;       /* IP selection options inherited from the configuration file. */
 	unsigned int last_resolution;	/* time of the lastest valid resolution */
 	unsigned int last_sent_packet;	/* time of the latest DNS packet sent */
 	unsigned int last_status_change;	/* time of the latest DNS resolution status change */
@@ -273,6 +271,7 @@
 	DNS_RESP_TRUNCATED,		/* DNS response is truncated */
 	DNS_RESP_NO_EXPECTED_RECORD,	/* No expected records were found in the response */
 	DNS_RESP_QUERY_COUNT_ERROR,	/* we did not get the expected number of queries in the response */
+	DNS_RESP_INTERNAL,		/* internal resolver error */
 };
 
 /* return codes after searching an IP in a DNS response buffer, using a family preference */