Move HTTPServer's valid_ip function to netutil.
Add a c-ares-based resolver implementation.
Add a resolver test script for external queries that cannot be unittested.

Note an issue with CaresResolver (it cannot resolve www.dropbox.com when
family==AF_UNSPEC)
Simplify the Resolver interface.

Most callers do not need the full generality of getaddrinfo, and
most alternative resolver implementations cannot provide it.