ari/resource_channels: Add channel variables earlier in the creation process

This patch tweaks the behaviour of POST /channels with channel variables such
that the variables are passed into the pbx.c routines that perform the
origination. This allows the variables to be assigned to the newly created
channels immediately upon their construction, as opposed to be assigned after
the originate has completed.

The upshot of this is that the variables are available on the channels if
they execute in the dialplan, as opposed to only being available once the
channels are answered.

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

Merged revisions 407937 from http://svn.asterisk.org/svn/asterisk/branches/12


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