Changed return value checks to specifically compare against -1. This will cause less breakage if Deimos updates to 0mq 3.2+
Fixed issue with nonblocking sockets