Some refactoring on AMQP API
Abstracted the AMQP connection for the bootstrap logic

We also get the configuration option to specify the pub/sub amqp url separately,
which is good to build relays.