Query A records before AAAA records in getaddrinfo() when AF_UNSPEC
is specified. Some broken DNS servers return NXDOMAIN against
non-existent AAAA queries, even when it should return NOERROR
with empty return records. This is a problem for an IPv4/IPv6 dual
stack node since the NXDOMAIN returned by the first query of
an AAAA record makes it give up querying the A record. Also, this
behavior has been recognized as a potential denial-of-service attack.
Note that although the query order has been changed, the result
linked-list of (struct addrinfo) set by getaddrinfo() is still
in order of AF_INET6 -> AF_INET.
Reference: http://www.kb.cert.org/vuls/id/714121