First attempt at amqp support
Fixes for error detection
Make drop_privileges and several AMQP options configurable at runtime