Use .invalid TLD for tests per RFC 2606

From RFC 2606 section 2:

".invalid" is intended for use in online construction of domain
names that are sure to be invalid and which it is obvious at a
glance are invalid.
Make unresolvable host test more robust
Fix intermittent test failure

ServerSocket.getLocalSocketAddress() can take over a second to run, causing testConnectTimeout() to incorrectly fail.