Add SocketError as a connection error class

SocketErrors are thrown when DNS lookups (`getaddrinfo`) fail temporarily.

@wvanbergen @jamesmacaulay