amqp plugin: Added support for rabbitmq-c 0.4.x.

Upstream introduced a new socket interface and deprecated the old one. This
leads to compiler errors when using GCC and -Werror.

This compiles but I don't have a way to actually test the change :-/
However, the patch basically follows examples provided by upstream,
so chances that something goes wrong should be fairly small.