Merge pull request #623 from ricnewton/master

Fix compile error on windows.
Fix up threading code from port tests to windows.
Merge branch 'master' of https://github.com/zeromq/libzmq