Provide a helpful error message when name resolution fails
Previously, this would print a message like:
getaddrinfo: nodename nor servname not provided, or not found
Which is opaque to anyone who doesn't already know what it means. This is a
very common case (it happens, for instance, when first starting a default agent
without setting up a DNS entry for 'puppet'). Now, we catch SocketError when
making an HTTP request, and print a more useful error message if this is the
particular failure case.