celery_backend.listener: make the event listener reliable
We reimplement the event listener using kombu directly instead of
Celery, which allows us to create persistent queues and manually ack the
messages once we have received them.
We bundle messages by packets of 1000 or 1/second when sending them to
the database. We only ack the messages once the database transcation has
ended.