Cleanly close RabbitMQ inside dispatcher.py