format_graphite: Implement the "separate instances" and "always append ds" options.

Fixes Github issue #214.
Riemann UDP write plugin

First implementation of a riemann plugin.
This is basic for now and only support
sending to a UDP target, later work will
include notification support and service
rewriting.

Signed-off-by: Florian Forster <octo@collectd.org>
add support for notifications as well

Signed-off-by: Florian Forster <octo@collectd.org>
take into account PR comments from @octo

Signed-off-by: Florian Forster <octo@collectd.org>
riemann plugin: Improve the riemann_send() function.

Make the passed in "Msg*" const, use swrite() to make sure the entire
buffer is sent and break out the disconnect logic into an own function.
riemann plugin: Remove trailing white-space.
riemann plugin: Make all private funcitons and module-global variables "static".
riemann plugin: Move the creation of protobufs into their own function.

This also adds a couple more tags, e.g. "type:..." and so on. The "host"
field is now correctly populated from the vl->host or n->host field.
riemann plugin: Add support for service names.

I.e. you can not define a "riemann" service in /etc/services and then use
«Port "riemann"» in the configuration. Also add support for arbitrarily
long host names.
riemann plugin: Fix a double-free issue with the shared structure.

The reference to the riemann_host structure is shared between the write
and the notification callback. Upon exit, riemann_free() is called twice,
via the user_data_t structure passed to the register functions. Previously
this would have caused a double-free, which is unacceptable.

This patch introduces a reference counter and will only free the structure
(and close the socket) when the last reference is freed.

The locking has been moved out of the riemann_connect() function and into
the riemann_send() function. It is unlikely, but not impossible that two
threads interfere with each other when writing to the socket.
riemann plugin: Fix two minor bugs.
src/common.[ch]: Implement strarray_{add,free}.
riemann plugin: Use the new strarray interface to allow indefinite number of tags.
riemann plugin: Implement the "StoreRates" option.
Merge remote-tracking branch 'github-octo/pyr/riemann' into pyr/riemann
dbi plugin: Implement support for numeric options.

Fixes Github issue #233.
Look for IOPowerSources.h on Darwin only

Signed-off-by: Florian Forster <octo@collectd.org>
write_graphite: Decrease a buffer size.

If the buffer is too large, it is possible that the message cannot be
send using the send buffer, leading to a failed assertion in
wg_send_message().

Fixes Github issue #226. Thanks to @bwhaley for reporting this.
Merge remote-tracking branch 'origin/collectd-5.2' into collectd-5.2
riemann plugin: Clean up the riemann_connect() function.

Don't warn when connecting to some address fails. The system could, for
example, not have any IPv6 connectivity but the address record also
includes an IPv6 address. In this case a connect(2) call will fail but
this is not a problem.

Due to the new locking one of the concurrency checks was made redundant.