as discussed, reverted the adition of zlist_curr
Problem: sending complex commands to actors is too clumsy

C isn't a neat language for sending mixed types as messages, e.g.
a string, an int, and a binary chunk, as one message. In zbeacon
this makes for a cumbersome API.

Solution: use a 'picture' and va_args to allow arbitrary types in
the send command. Implement this in zsock_send and zsock_recv,
which were waiting for something fun.
Problem: using old actor API style in zbeacon selftest

Makes for clumsy code. Solution: use zsock_send/zsock_recv, which
provide short 1-liners for richer command sending.

Nice results, new zbeacon is 422 lines of code, down from 580 LOC.
Problem: zsock_send cannot send pointers

Solution: extend picture with 'p' for pointer encoding/decoding

Done, and added test case for this.
Fix MacOS X compilation - missing newline at end of file
Merge pull request #638 from twhittock/mac-compile

Fix MacOS X compilation - missing newline at end of file
Problem: inconsistent whitespace style

Specifically, missing space before '('.

Solution: fix these.
Problem: need selective zsock_recv

E.g. to just get certain fields and ignore others.

Solution: if caller passes NULL arguments, skip those fields.
Additionally, if sender returns short message (e.g. just first field)
then set all following return values to NULL or zero.
Merge pull request #636 from hintjens/master

New picture message methods for zsock
Added support for empty frames in picture messaging
Improved actor API man pages
Problem: container APIs aren't consistent

Comment: use of cursor is IMO overdeveloped in zring and puts
onus on application to set state correctly. This shows in
methods like zring_delete, which depend on that state. I don't
like it. The zlist API for deleting was a single "find item
and then delete item" semantic that I prefer.

Solution: make container APIs simpler and more consistent.

- use czmq_destructor, czmq_duplicator, and czmq_comparator for
  callbacks

- deprecate autofree in zhash and zlist

- use zxxx_set_destructor () etc. to set these at container level

- deprecate _dup and make new _copy that uses duplicator, as the
  zlist_dup method depends on autofree

- clean up list insertion methods: _prepend, _append, and no
  _insert

- rename/deprecate _remove -> _delete for consistency

- change zring_delete to do item search as zlist_delete

- add _detach as non-destructive delete (if item destructor isn't
  set, does exactly same as delete)

Still todo: modify rest of CZMQ codebase to use this new API.
Problem: cannot move away from _dup method

Suggested _copy won't work as there are too many classes that use _dup
and the inconsistency is horrid.

Solution: break backwards compatibility on zlist_dup and zhash_dup,
so these use the new container callbacks. The old methods using the
autofree approach are still there, as _dup_v2.
Missing czmq.h with callback definitions
Problem: confused insert/delete semantics

- after prepend/append, leave cursor at newly created item
- zring_detach/_delete check at cursor first, this makes these methods
  symmetric with prepend/append, and efficient for deleting in a search
  loop (though the methods also do the search)
- zring_detach/delete accept NULL for item, meaning "at cursor"
- fix zring_detach to return detached item, so zring_delete can be built
  on top of it
- add zring_item method from zlist
- add zring_purge to empty ring without destroying it, and use this in
  zring_destroy
Merge pull request #639 from hintjens/master

Added support for empty frames in picture messaging
Problem: need purge method

Added zlist_purge. Also, append/prepend move cursor to created item
so that you can use detach/delete immediately after, as you'd expect.
Problem: selftest has memory leaks
Problem: zlist_purge does not reset list size

Solution: set size to zero when purging list.
Problem: ziflist doesn't take copy of inserted values

As I removed the autofree call, it's pointing to transient values
that get destroyed prematurely.

Solution: use _set_destructor ((czmq_destructor *) zstr_free) and
strdup() on all inserts.