Fixing server initiated connection / channel close handling.

Previous code wouldn't work if the server initiated the close. Test with RabbitMQ management and try to do a force close. This will allow a consumer to recover and reconnect.
10,61 is for AMQP 0.8 and 10,51 is for AMQP 0.9.1 We need a way here to send the proper one based on the protocol in use