Fix unit test failures when the host has no internet connection.

One annoying aspect of working on planes is that several of the unit tests fail
in ugly ways if the host has no internet access. I've added a check that tries
to resolve the hostname for google.com and skips any tests that require network
access.

Eventually, we should fix these tests to use mocks running on the host to
completely isolate us from third-party servers and internet connections.

Testing done: Ran unit tests whilst in-flight.
Reviewed at https://reviews.reviewboard.org/r/4569/