Code common to Connection and Channel objects.
Superclass for both the Connection, which is treated as channel 0, and other user-created Channel objects.
The subclasses must have a _METHOD_MAP class property, mapping between AMQP method signatures and Python methods.
Close this Channel or Connection
Wait for a method that matches our allowed_methods parameter (the default value of None means match any method), and dispatch to it.