Fix broken AMQP driver code path

This change set fixes a broken code path that manifests with the current AMQP gem (1.0.2). Commit: cf955e5.
The other 3 commits just remove some warnings and make code more readable.