JSONRPCServer, AirPlayServer: listen on ipv6 if available.
Try to open an ipv6 socket and disable IPV6_V6ONLY to make
it dual stack. If we can't get a socket because ipv6 is not
supported at runtime (i.e. ipv6.ko not loaded), fallback to
ipv4.