Resource deallocation

Here is a sample test as well as the revert of the commit for the closing of the sockets.
Please note that the unit test does not end with Test so it will not be running in automatic testing, as this kind of stress test may need to run for a long period of time.

This exact same test can be used on my machine to detect resource deallocation problems in sockets as well as in polling
I'm going to look in depth at this -- reverting the fix will cause shutdown to hang. This line of code doesn't exist in libzmq. I'll track down the memory leak and see if there is another fix for this.