Reading in the debug flag in a cleaner way
Lots of changes

Long commit, sorry - didn't commit along the way and stuff got tangled.
Shame on me.

Changes:
- moved the delivery-handling function (i.e. the business logic) out of main
- removed rmq log queue following feature. this can be achieved with
  already-existing functionality and the previous implementation wasn't
very flexible.
- allowing consume-cat to exit after processing all messages in its
  queues
- acking messages *after* they are successfully processed
Oops, forgot to clean up a couple comments and print statements