Retry connecting to rabbitmq at each message

If no connection exists, retry connecting to rabbit for each message sent.
Handles cases where rabbit is late to start, so we still deliver as many messages as possible.

Also adds a main() to avoid stupid globals() leakage.