ipv6: listen on appropriate addressing family
Rather than only listening on AF_INET, regardless of the addressing family needed to support the supplied hostname, listen on the addressing family of the first result from getaddrinfo() after re-ordering to make sure AF_INET6 addresses come first.
This enables dual-stack listening by default with no hostname specified.
This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865520