Resolve remote node hostnames.

As remote nodes are sending their hostnames in the announces, they need
to be resolved to be able to interconnect. Also handle socket errors
gracefully.