Fix possible memory leak in error situation
Riemann plugin: Big refactoring to add buffer queue

Under bigger load running collectd as an aggregator server the sending
of every plugin_write() as separate message appears to become
problematic so added buffer queue of Riemann events and sending them in
bigger chunks to forward. Bigger chunks don't fit to UDP packet anymore
so switched to use TCP connection.
Riemann plugin: Added FlushTreshold

Added separate configuration option FlushTreshold to trigger buffer
flushing before it's filled up. This provides some safety in case of
intermittent network disruptions. Configration option defaults to half
of the buffer length if not set.
Merge branch 'riemann-plugin' into debian-package