Don't resolve hostnames until we actually want to do networking.

Sped up tests by about 100%.