Fix issue #553 by providing explicit shutdown function.

Required as Windows dll shutdown order is not guaranteed - winsock
can be shut down before zmq, making atexit unusable on Windows
Merge pull request #705 from twhittock/master

Fix issue #553 by providing explicit shutdown function.