Switch to RabbitMQ from Pgq

Instead of using PgQ, use RabbitMQ as the messaging system. This commit also
introduces automatic retrying of events. For information on this, please see
[Arch.md](Arch.md).