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.
amqp plugin: Fixed compilation when using rabbitmq-c < 0.4.

Thanks to Marc Fournier for noticing!
[network] set_thread_cbs so we initialize the right threading mode in gcry_check_version

Signed-off-by: Florian Forster <octo@collectd.org>
apache plugin: Call curl_global_init() from the init function.

This is a shot in the dark in trying to address #513. By calling this
from an init() callback, I hope to be initializing the curl and gcrypt
libraries before collectd becomes multi-threaded, avoiding the problems
described in the issue.
network: comment libgcrypt initalization process
amqp: fix symbol lookup error with librabbitmq >= 0.4.0

amqp_socket_close() which we were using isn't exported anymore.
See https://github.com/alanxz/rabbitmq-c/commit/bdda7ab

amqp_destroy_connection() implicitly closes the socket, so we don't need
to bother about this if using librabbitmq >= 0.4.0

credits to @tokkee for figuring that out !
Merge pull request #2 from mfournier/amqp-symbol_lookup

amqp: fix symbol lookup error with librabbitmq >= 0.4.0
amqp plugin: Don't use C++ style comments.
configure: Fixed linker options when checking for amqp_tcp_socket_new.

This fixes the check when using GCC's --as-needed which fails when options are
not specified in the right order. Libraries (-l options) have to be specified
after any source files. autoconf does the right thing when using $LIBS for
that case rather than $LDFLAGS.
Merge remote-tracking branch 'origin/pr/490' into collectd-5.3
Merge remote-tracking branch 'origin/collectd-4.10' into collectd-5.3
Merge branch 'collectd-5.3' into collectd-5.4