Close httpclient socket

When using httpclient it happens that all requests stay as CLOSE_WAIT
and hold OS's file descriptors so I'm adding a sock.close() call to make
sure that all sockets get closed. Tested on Osx Lion (10.7). Also added
a destructor to the sock class, close(); should be called directly
inside the destructor but doing so makes the mongo client crash. This
should be reviewed.