Closing the socket after nn_usock_cancel_io.

There was a handle leak because after a nn_usock_cancel_io the state was being set to NN_USOCK_STATE_DONE without closing the socket.

Also changed the tcp_shutdown test to be easier to configure (but it could still use some command line parameters) and changed the active var  to atomic because the decrement was not thread safe.

Under MIT license.