Add support for requiring that all queued messages on a caching topic have been handled before
retrieving from the cache and also change adding channels to an endpoint to be an immediate
operation.

Review: https://reviewboard.asterisk.org/r/2599/


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