This fixes a nasty chanspy bug which was causing a channel leak every time a spied on channel made a call.
In addition to the above, it makes certain channel destruction occurs so that applications don't get stuck waiting for datastore destruction while monitored by chanspy.
(closes issue #18742)
Reported by: jkister
Tested by: jkister, jcovert, jrose
Review: http://reviewboard.digium.internal/r/106/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@311197
65c4cc65-6c06-0410-ace0-
fbb531ad65f3