Fix for issue #246: Connection does not close cleanly

Without this modification, calls to connection.end will close the socket without notifying the RabbitMQ server.  This results in a warning in the RabbitMQ logs stating that the connection was closed abruptly.

This fix follows the AMQP 0-9-1 specification by sending the connectionClose method to the server and waiting for a connectionCloseOk response before closing the connection.