Problem: Can't publish messages with mshell

Actually mshell crashes while trying to send the message.

Solution: Fix off-by-one error causing the crash.
Merge pull request #31 from miska/master

Problem: Can't publish messages with mshell
Merge pull request #32 from hintjens/master

Implementing service pattern
Merge pull request #33 from hintjens/master

Problem: need authenticated access
Merge pull request #36 from hintjens/master

Fix mshell send failures, simplify client receive API
Fix docs installation and install config file

Problems:
* Man pages can't be installed unless you have zproject
  installed.
* Malamut doesn't install it's config file that it requires for running.

Solution:
* Add config to project.xml and Regenerate autotools stack using
  zproject
Merge pull request #39 from miska/master

Fix docs installation and install config file
Problem: Need to be able to start malamute as part of the system

Solution: Wrote service file for malamute and made it installable.
Merge pull request #41 from miska/master

Problem: Need to be able to start malamute as part of the system
Problem: was not re-registering clients correctly

Stream re-registration code was incorrect, so second client using
the same pattern would not get any messages.

Solution: fix this.

Problem #2: at shutdown, did not properly flush in-flight messages.

Solution: do shutdown handshaking unless process was interrupted.
Problem: mlm_msg is misnamed

We need this name for the message held internally on the server.

Solution: rename mlm_msg -> mlm_proto (protocol)
Problem: need separate class for messages

So that we can make mailbox and service engines that hold a
consistent data structure we can pass between threads.

Solution: move message structure to mlm_msg class.
Problem: project.xml got autoconfy

Solution: fix this in zproject and regenerate here.
Problem: mailbox handling is hardcoded into server

Solution: split off using mailbox engine API, which has two commands,
STORE and QUERY.
Problem: inconsistent use of message inside server

Solution: use mlm_msg_t everywhere, and add reference counting so that
a single message can be safely broadcast to many stream consumers.
Problem: API to mlm_msg_new is needlessly complex

Solution: pass content as zmsg_t * not zmsg_t **.
Problem: mlm_msg reference counting is not thread safe

Solution: use lockfree reference counting. To make this work in a
portable fashion, I extended the libzmq API, so Malamute needs the
libzmq master version of 2014/12/23 or later. This is marked as
version 4.2.0.

The code is now theoretically threadsafe in that a stream engine
can send the same message to many other threads, which can then
drop their references as they like.