Merge pull request #523 from evoskuil/master

Add missing dynamic lib export, fix warning.
Problem: zsys deadlocked at exit, if ZSOCK_NOCHECK was defined

The code in zsys_close was wrong; it did not close sockets when the
macro was defined (due to sockets not being tracked). This led to a
shutdown deadlock in libzmq (due to 1 or more sockets remaining open).

Solution: when ZSOCK_NOCHECK is defined, do not attempt to use list
of tracked sockets in zsys_close. Always close socket. Second, if there
are sockets remaining open, log an error but don't call zmq_term().
Merge pull request #525 from hintjens/master

Problem: zsys deadlocked at exit, if ZSOCK_NOCHECK was defined
Fixing minor bug with getting curve key from socket options
Merge pull request #526 from kedrzu/master

Fixing minor bug with getting curve key from socket options
Problem: was passing wrong size to zmq_getsockopt on keys

libzmq requires receiving buffer to be exactly 32, or 41 bytes
for a binary or Z85 key respectively. CZMQ was passing a 255
byte buffer, and then ignoring the EINVAL return code. This was
caught by the new --with-militant assert checking (yay!)

Solution: pass a 41 byte buffer as required by the zmq_getsockopt
man page.
Problem: did not build until CZMQ was already installed

The generated zgossip_msg class assumed czmq.h was in /usr/local/include
which is correct for all applications except CZMQ itself. Zproto now
checks for czmq.h in ../include, and uses that if possible, else uses
the file in /usr/local/include/czmq.h.
Updated man pages
Regenerated zgossip server engine
Merge pull request #528 from hintjens/master

Problem: was passing wrong size to zmq_getsockopt on keys
Problem: need way to capture log data in any binding

Solution: allow zsys to send log data to a PUB socket. zsys_logsender
defines an endpoint that log data will be sent to. This can also be
set by the ZSYS_LOGSENDER environment variable.
Merge pull request #529 from hintjens/master

Problem: need way to capture log data in any binding
Problem: unreliable dependency on libsodium

CZMQ doesn't need libsodium, as all relevant calls are wrapped in the
zmq_util layer. Furthermore, detecting and using libsodium in CZMQ is
fragile as it is too easy to build libzmq and CZMQ inconsistently.

Additionally, the previous approach assumed CZMQ would be rebuilt if
there was a change to libzmq.

Solution: remove all dependencies on libsodium. Use zsys_has_curve()
to detect and report whether libzmq was built with libsodium or not.
This lets us switch CURVE on/off dynamically by installing different
builds of libzmq.
Merge pull request #530 from hintjens/master

Problem: unreliable dependency on libsodium
Added GSSAPI socket options
Merge pull request #531 from hintjens/master

Added GSSAPI socket options
Problem: CZMQ always catches SIGINT / SIGTERM

Solution: if ZSYS_SIGHANDLER=false, in process environment, do not
handle signals. Otherwise, by default, handle them.
Merge pull request #533 from hintjens/master

Problem: CZMQ always catches SIGINT / SIGTERM
Problem: zctx_new always catching interrupt signals

Solution: make conditional on ZSYS_SIGHANDLER environment variable
as done in zsys.
Merge pull request #534 from hintjens/master

Problem: zctx_new always catching interrupt signals