Avoid triggering invalid HOOK_CHANNEL_CREATE or HOOK_CHANNEL_JOINs
When a channel is created in response to a join or create, we send out the
HOOK_CHANNEL_NEWCHANNEL message. Some things (e.g. Q9) might choose to
kick the user off, thus destroying the channel, in response to this. In
such an event, sending HOOK_CHANNEL_CREATE or HOOK_CHANNEL_JOIN out with
a now invalid channel pointer can cause trouble, so don't do it.
Note there is the potential problem that the chanindex * can become
"invalid" when the channel is destroyed; in practice this should not be a
problem because (a) Usually something else will be hanging off the chanindex
if it has decided to kick the user out! and (b) chanindex's are allocated
using a recycling pool allocator, so even if the chanindex has been free'd
it will still be a valid pointer.