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
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.
Problem: redundant strdup() added in last changes

Causes memory leak on zcert metadata

Solution: we don't strdup on hash keys.
Merge pull request #640 from hintjens/master

More small shifts on containers