Merge pull request #145 from jemc/master

Solution: Use class.title instead
Problem: does not show teminate_event in animation

Solution: treat terminate as "normal" event rather than -1, and
number other events from 2 upwards. Thus when the FSM terminates
we see the terminate event displayed properly, before it ends.
Problem: method is wrongly passing event as int

Solution: use event_t properly.
Problem: mailbox functionality is too complex

The codec used a mailbox to queue external commands it could not
process in the current state. However this is complex to use and
not evidently useful.

Solution: remove this.
Problem: names for socket handlers are not ideal

Solution: improve the names to match usage in client generator.
Problem: s_event_matrix isn't used

Commit 0fbb864 removed the mailbox functionality, so the event matrix
isn't needed.

Solution: remove it.
Problem: C codec is too slow

Solution: rewrite this to reduce/eliminate memory allocations. This
breaks existing apps that use generated C codecs, so the old codec
is renamed to zproto_codec_c_v1.gsl.

The new codec has a simpler API without the hash/list access methods.
It works as follows:

* Rather than create/destroy an object for each recv/send, you keep
  the object for the duration of the socket.

* A single object gets reused for all requests and responses, with
  its properties being overwritten.

* Short strings are allocated as 256-char arrays within the object,
  so not allocated/freed during send/recv.

* The codec uses the low-level libzmq API to reduce heap memory
  use.

* Implements the exact same wire protocol, of course.
Merge pull request #146 from hintjens/master

Part of an ongoing cleanup of server/client codecs
Problem: zproto_server_c.gsl used old codec style

Solution: switch to using new faster codec. This breaks existing
apps in a specific way (sorry, you will have to fix them):

* self->request and self->reply are now replaced by the single
  property self->message. Note the new format of _client_t:

    struct _client_t {
        //  These properties must always be present in the client_t
        //  and are set by the generated engine; do not modify them!
        server_t *server;           //  Reference to parent server
        $(proto)_t *message;        //  Message in and out

        //  TODO: Add specific properties for your application
    };

* These methods are gone from the v2 codec, so no longer available
  to your zproto_server apps:

    _decode
    _encode
    _recv_nowait
    _send_again
    _encode_xxx
    _send_xxx
    _dup
Problem: "dictionary" type is poorly named

This is inconsistent with the other types (chunk, frame, uuid, msg)
that correspond to CZMQ classes. It's also long and boring to type.

Solution: rename to "hash".
Merge pull request #147 from hintjens/master

Massive breaking changes for C server/codec
Problem: zproto_client_c not using v2 codec

Solution: switch to new codec style in same way as for server.

This also makes the code more consistent; it is always self->message
rather than various other names.
Merge pull request #148 from hintjens/master

Problem: zproto_client_c not using v2 codec