BUG: use shutdown() instead of close() for sockets

This keeps the handle open long enough to raise the closed event to
the client. See:
http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-2.html#ss2.6

for https://github.com/openigtlink/OpenIGTLinkIF/issues/9