Problem: zmq_ctx_get (ZMQ_MAX_SOCKETS) returns gibberish

Well, not gibberish, but 2^31 on Linux, which is useless. The code
should probably use getrlimit on Linux and other calls depending on
the system. For now I've set the ceiling at 64K.
Fixed testcase for ZMQ_MAX_SOCKETS
Merge pull request #1090 from hintjens/master

Problem: zmq_ctx_get (ZMQ_MAX_SOCKETS) returns gibberish