More reliably determine client's own IP

`socket.gethostbyname(socket.gethostname())` tends to return the loopback address