Removed debug output
Merge pull request #517 from hintjens/master

Removed debug output
Updated man page for zgossip
Problem: zconfig crashed when hitting invalid config file

After loading chunk, did not check properly for nullified
self, signalling invalid file.

Solution: check properly for this. Also, fixed up error
messages to use zclock_log instead of fprintf.
Regenerated man pages
Added temporary tracing for zsys_set_interface
Problem: logging is not consistent

Solution:

* Remove (kill) zlog class, which turns out to be too hard to use as
  it requires passing class instance all around application.

* Deprecated zclock_log method, which is not an obvious place for a
  default logging method.

* Added zsys_error, zsys_warning, zsys_notice, zsys_info, zsys_debug
  to send log messages to system facility.

* Added zsys_set_logident to define prefix or sender name for searching.

* Added zsys_set_logstream to allow logs to be sent to stdout/stderr.

* Added support for ZSYS_LOGIDENT and ZSYS_LOGSTREAM=stdout/stderr in
  the environment.
Removed temporary debug script
zsys logging now defaults to stdout

This is what naive apps expect; to switch to system logging layer,
use zsys_set_logstream (NULL).
Using zsys_error/info more systematically
Regenerated zgossip msg layer

- also fixed typo in zsock_monitor
Problem: zmsg_print and zframe_print go to stdout

All logging has to go to a single controllable destination, which
may be stdout or stderr, or may be the system logging facility.

Solution: fix zmsg_print and zframe_print to use zsys_debug for
their output. Deprecate zmsg_fprint and zframe_fprint, as it is
cleaner to call zsys_set_logstream (somefile) to direct all log
traffic to the desired file.
Problem: need to support ZMQ_MAX_SOCKETS

Solution: added zsys_set_max_sockets, and ZSYS_MAX_SOCKETS environment
variable. Note that currently the application cannot set max_sockets
after creating a socket (it will assert, not return an error).

Additionally, changed zsys_set_iothreads to zsys_set_io_threads for
consistency with ZMQ constants.
Minor cosmetic fixes
Fixed to build on libzmq 3.2.x
Problem: actor shutdown left dangling socket

In some cases when main thread ended before actor did, the shutdown
protocol left the actor thread hanging until the context was killed,
which meant its pipe socket was not destroyed. The culprit was the
zsock_signal at actor shutdown, which sometimes blocked.

Solution: set the actor pipe sndtimeo to zero.
Problem: want logging both to syslog and stdout

Solution: independent control of both these options, with two separate
methods and environment variables:

* zsys_set_logstream () / ZSYS_LOGSTREAM
* zsys_set_logsystem () / ZSYS_LOGSYSTEM
Forgot to export zsys_set_logsystem
Don't use zmq_ctx_set ZMQ_MAX_SOCKETS yet
Merge pull request #518 from hintjens/master

Fixes to config file handling