dns/apple: Ensure the Apple DNS resolver gets all IPs for the host
If the DNS query protocol to the Apple DNS resolution API DNSServiceGetAddrInfo is either IPv4 | IPv6, or if protocol is set to 0, the resolution callback will be invoked at least twice: at least once for the IPv4 family and at least once for the IPv6 family.
Previously, we were not waiting to ensure we received both the IPv4 and the IPv6 response (even if empty), which meant the resolver would finish a DNS resolution without necessarily getting all the responses from the DNSServiceGetAddrInfo call.
If the resolver finished while getting an IPv6 address, but not yet having received an IPv4 address for the host, and the device is on a network that doesn't support IPv6, then connections made to the host would all result in a "no route to host" error.
This PR fixes the problem by ensuring we don't finish the DNS query resolution until all responses (for both v4 and v6, if requested) have been received in the resolution response callback.
/assign @RyanTheOptimist
/wait