Added consume_cancel_handler attribute/callback.

Added tests for firing of connect/disconnect and channel open/close
callbacks.