Use getaddrinfo() instead of gethostbyname()

The latter is not re-entrant, so not thread-safe.  This fixes crashes on non-Windows, and at least assertions (if not crashes) on Windows when server reporting is enabled.  Oops.

At the same time, support round-robin DNS in a sort of trivial way.

Left the old API there in case you're using it, but might be better to clean it up if you're not.

-[Unknown]