merged connection close changes from github.com/FearlessLittle/node-amqp