Merge pull request #28 from jemc/master

Problem: Old zproto client code leask memory.
Problem: _recv doesn't hand over msg to caller

Solution: fixed in zproto and regenerated here.
Merge pull request #29 from hintjens/master

Problem: _recv doesn't hand over msg to caller
Problem: mlm_client_new does not send address

This is needed to set the 'sender' in deliveries, and for mailbox
routing.

Solution: add address argument to constructor and expand test cases
to check this is properly sent in deliveries.
Problem: need MAILBOX functionality

Solution: implement minimal mailbox functionality and MAILBOX SEND
and MAILBOX DELIVER commands. Still to be fully tested.

Note: mailboxes are asynchronous (client can fetch mail at any time)
however they are not persisted to disk, and messages are not tracked
at present (so are lost if client dies while processing them).
Merge pull request #30 from hintjens/master

Adding request-reply support
Problem: client does not check mailbox at connection time

Solution: check mailbox and deliver any pending messages on
new connection to server (this is done in server FSM).
Problem: server contains debugging output

Solution: remove this
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
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.
Problem: lack implementation for SERVICE OFFER

Solution: implement simple service bus in broker, and extend
SERVICE OFFER command to have reply OK/ERROR from server. Add
to mlm_client test case.
Problem: not freeing message after recv

Solution: client has to free received message
Problem: need service distribution

Solution: implement SERVICE commands

Fixes #22

Note, until credit based flow control is implemented, service requests
are sent on round-robin basis without any waiting. This is not yet a
load-balanced queue.
Merge pull request #32 from hintjens/master

Implementing service pattern
Problem: need authenticated access

Solution: use PLAIN security to start with:

* mlm_client_new () address field is 'username/password' where the
  username is a mailbox name.
* malamute.c server checks passwords according to configuration,
  see malamute.cfg 'auth' section.
* mlm_server config section specifies that server uses PLAIN security
  mechanism.
* src/passwords.cfg is test password set.

Fixes #21
Cleaned up selftests
Problem: client API names are clumsy

The _produce/_consume/_provide names are clumsy and don't explain
themselves.

Solution: use set_producer, set_consumer, set_worker to show the
various roles involved.
Problem: client send API is too clumsy for common use

Having to send zmsg_t structures is fine for real applications
yet it's clumsy for simpler cases.

Solution: provide additional API that focusses on string data.

    mlm_client_sendx (send string data to stream)
    mlm_client_sendto (send string data to mailbox)
    mlm_client_sendfor (send string data to service)

These take multiple strings, sending as multiframe data. You end
the argument list with NULL (same style as zstr_sendx, where this
is taken from).
Problem: crashes when cleaning up expired client

Solution: fixed in zproto, regenerated here.

Fixes #34