fixed deprecated ZMQ_UPSTREAM (now ZMQ_PULL), fixed missing unistd.h header

I'm trying to build m2cpp with latest zmq and found that ZMQ_UPSTREAM is deprecated. ZMQ_PULL should be used instead. The CGI implementation had a mssing unistd.h header (for ::getopt) on my system.