patch 9.0.1165: tests using IPv6 sometimes fail

Problem:    Tests using IPv6 sometimes fail.
Solution:   Use getaddrinfo() and use try/catch. (James McCoy,
            closes #11783)
diff --git a/src/testdir/test_channel_lsp.py b/src/testdir/test_channel_lsp.py
index 2357452..10b4fb4 100644
--- a/src/testdir/test_channel_lsp.py
+++ b/src/testdir/test_channel_lsp.py
@@ -306,7 +306,12 @@
         writePortInFile(port)
         time.sleep(0.5)
 
-    server = server_class((host, port), ThreadedTCPRequestHandler)
+    addrs = socket.getaddrinfo(host, port, 0, 0, socket.IPPROTO_TCP)
+    # Each addr is a (family, type, proto, canonname, sockaddr) tuple
+    sockaddr = addrs[0][4]
+    server_class.address_family = addrs[0][0]
+
+    server = server_class(sockaddr[0:2], ThreadedTCPRequestHandler)
     ip, port = server.server_address[0:2]
 
     # Start a thread with the server.  That thread will then start a new thread