sockets created by accept are leaked to child processes (ticket #956)

I have tested the fix only on Solaris where it seems to work fine. It's quite simple so I don't expect that it would break anything on other platforms (though I don't know libzmq well enough to know for sure)