Create Local channel messages on the Stasis message bus and produce AMI events

This patch does the following:

* It adds a virtual table of callbacks to core_unreal. These callbacks can be
  supplied by concrete implementations of "unreal" channel drivers, which lets
  the unreal channel driver call specific functionality when it performs some
  action. Currently, this is done to notify implementations when an
  optimization operation has begun, and when an optimization operation has
  succeeded.

* It adds Stasis-Core messages for Local channel bridging and Local channel
  optimization. Local channel optimization is now two events: a Begin and an
  End. Some consumers of Stasis-Core may want to know when an operation is
  beginning so that they can 'prepare' their information; others will be more
  concerned about when the operation has completed, so that they can 'fix up'
  information. Stasis-Core allows for both, as does AMI.

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



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@393801 f38db490-d61c-443f-a65b-d21fe96a405b
Move channel driver Registry manager events to core.

This also shuffles the stasis system topic and related handling.

(closes issue ASTERISK-21488)

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@393804 f38db490-d61c-443f-a65b-d21fe96a405b
ARI: Add support for getting/setting channel and global variables.

This allows for reading and writing of functions on channels.

(closes issue ASTERISK-21868)

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


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