Re-order cleanup

This patch attempts to fix some possible race conditions in shutdown of the
CDR engine. It:
* Adds a cleanup handler to only unsubscribe and join on stasis messages during
  graceful shutdown. The cleanup handler should execute before the regular atexit
  handler, as we want to unsubscribe for any further messages before dispatching
  the CDRs.
* The CDRs are now locked when we dispatch them on shutdown.

git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394469 f38db490-d61c-443f-a65b-d21fe96a405b
Simplify bridge_simple chan join code.

git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394470 f38db490-d61c-443f-a65b-d21fe96a405b
Remove some dead code dealing with old bridging method.

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