Two more segfault fixes:

 - SocketIPv6 desctructor for TCP socket
 - query by address no longer segfaults if address was not present.