This patch adds a new message bus API to Asterisk.

For the initial use of this bus, I took some work kmoore did creating
channel snapshots. So rather than create AMI events directly in the
channel code, this patch generates Stasis events, which manager.c uses
to then publish the AMI event.

This message bus provides a generic publish/subscribe mechanism within
Asterisk. This message bus is:

 - Loosely coupled; new message types can be added in seperate modules.
 - Easy to use; publishing and subscribing are straightforward
   operations.
 - Consistent memory management; all message bus objects are AO2
   managed objects, using ao2_ref() and ao2_cleanup() to manage the
   reference counting.

In addition to basic publish/subscribe, the patch also provides
mechanisms for message forwarding, and for message caching.

(closes issue ASTERISK-20959)
Review: https://reviewboard.asterisk.org/r/2339/


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@382685 f38db490-d61c-443f-a65b-d21fe96a405b
Add message dump capability to stasis cache layer

The cache dump mechanism allows the developer to retreive multiple
items of a given type (or of all types) from the cache residing in a
stasis caching topic in addition to the existing single-item cache
retreival mechanism.  This also adds to the caching unit tests to
ensure that the new cache dump mechanism is functioning properly.

Review: https://reviewboard.asterisk.org/r/2367/
(issue ASTERISK-21097)


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@382705 f38db490-d61c-443f-a65b-d21fe96a405b