Dial API: Add a dial option to indicate the dialed channel will replace dialer

Adds an option to the dial API that marks an outgoing dial as replacing the dialing channel for the purpose of propagating accountcode. When it is used, AST_CHANNEL_REQUESTOR_REPLACEMENT is used instead of AST_CHANNEL_REQUESTOR_BRIDGE_PEER when setting accountcodes on the involved channels with ast_channel_req_accountcodes.

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/13@422684 f38db490-d61c-443f-a65b-d21fe96a405b
func_channel.c: Add missing locking to some CHANNEL() requests.

* The CHANNEL() audionativeformat, videonativeformat, audioreadformat, and
audiowriteformat now need locking since the media format rework when
accessing the channel's format pointers.

* Increased the buffer size for CHANNEL() audionativeformat and
videonativeformat output strings since the allow=all can be a lengthy
list.

* Tweaked the CHANNEL() XML documentation for secure_bridge_signaling,
secure_bridge_media, and state.

* Ensured the output buffer is initialized for secure_bridge_signaling and
secure_bridge_media.

* Made use the locked_copy_string() macro instead of inlining it for trace
and checkhangup.


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/13@422700 f38db490-d61c-443f-a65b-d21fe96a405b