Fix shutdown issues
cleanup clientmgr, mctx and sctx if we fail to properly initialize
ns_client structure
netmgr: fix a bug in which we accessed libuv structures from a
different thread, add additional DbC checks making sure we're
in a proper thread when accessing uv_ functions.
netmgr: don't send to an inactive (closing) udp socket
Edited by Witold Krecicki