AMQP-422: Add `active` check to the async close logic