Resurrect TcpListener::getMyAddresses()

It is needed by WinVNC, but got removed in 892d10a70. Also fix
a couple of issues:

 - Use getnameinfo() in order to be compatible with Windows XP
 - Make it static since it doesn't use a specific socket
 - Respect UseIPv4 and UseIPv6
 - Flags for getaddrinfo() that match binding code
 - Dummy service value for Windows compatibility
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index 29c09c6..bb55e7d 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -81,6 +81,7 @@
     virtual void shutdown();
     virtual Socket* accept();
 
+    static void getMyAddresses(std::list<char*>* result);
     int getMyPort();
   };