Fix broken console when logging binary data.

Encode the now random zmqids from workers when logging.
Pass defined HB constants to servers/workers.

The option to override HEARBEAT_MAXTRIES and HEARTBEAT_INTERVAL in
the etc/config.php was not working correctly as the servers and
workers do not include that file.  Now the defines are passed via
a combination of putenv and getenv.