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

Fixes Github issue #214.
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
write_graphite: Use the complain mechanism to report connection errors.

Fixes Github issue #236. Thanks to @pyr for reporting it!
src/utils_complain.[ch]: Fix the complaint mechanism after the sub-second change.
write_graphite plugin: Remove two more redundant error messages.

The failing functions already print an error message; don't spam the logs
by duplicating this.

Further fixes Github issue #236.
src/utils_dns.c: Improve ordering of includes.

sys, followed by net, followed by netinet, followed by arpa
that should be the most logical order

Signed-off-by: Florian Forster <octo@collectd.org>
postgresql plugin: Don't access realloc'ed memory.

D'oh! This is the most stupidest bug: all database connection objects are
stored in a plugin-global array and a pointer to each object was passed around
to the worker functions. This array used to be an array of objects (rather
than pointers) and was realloc'ed every time a new connection was added. Now,
the realloc caused the old pointer to not be valid any more, thus, any but the
last database connection were later accessing memory out of range. This caused
the plugin to segfault if more than one database connection was used.

Thanks to Greg Swift for reporting this!
Fixes Github issue #238.
If the file isn't closed such as when logging to stdout or stderr the file must be flushed for it to get out of the IO buffers right away.

Signed-off-by: Florian Forster <octo@collectd.org>
logfile plugin: Make "do_close" a boolean.
Fix make distcheck (against release 5.1.1)

Signed-off-by: Florian Forster <octo@collectd.org>
make distcheck : perllocal.pod was missing. Fixed

Signed-off-by: Florian Forster <octo@collectd.org>
bugfix ("cannot find collectd.h") for branch master (and 5.2)

Signed-off-by: Florian Forster <octo@collectd.org>
src/Makefile.am: Fix "make distcheck".

protoc-c has a weird handling of files not in the CWD: They have to be
specified with the "-I" option _and_ you need to specify the full path
to the file.
Added "tar-pax" (bugfix for long filenames with make distcheck)

Signed-off-by: Florian Forster <octo@collectd.org>
Bumped version to 5.1.2; Updated ChangeLog.
Merge branch 'collectd-5.1' into collectd-5.2

Conflicts:
	ChangeLog
	src/write_graphite.c
	version-gen.sh
Bumped version to 5.2.1; Updated ChangeLog.
Merge remote-tracking branch 'origin/collectd-5.2' into collectd-5.2
Updated ChangeLog.