Fix broken AMQP driver code path

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