RedHat initscript: small improvements

  * checks configuration before (re)starting, based on debian's
    initscript
  * use /etc/sysconfig instdead of /etc/default
  * include optional $ARGS in arguments passed to collectd.
RedHat RPM spec: update for 5.1 + improvements

  * Enabled all buildable plugins based on libraries available on EL6 +
    EPEL
  * All plugins requiring external libraries are now shipped in seperate
    packages.
  * No longer treat Java plugin as an exception, correctly set
    $JAVA_HOME during the build process + ensure build deps are installed.
  * Dropped per-plugin configuration files, as they tend to diverge from
    upstream defaults.
  * Moved perl stuff to /usr/share/perl5/
  * Don't alter Interval and ReadThreads by default, let the user change
    this himself.
  * Drop collection.cgi from main package, as it's been obsoleted by
    collection3
  * Moved contrib/ to its own package, to avoid cluttering the main
    package with non-essential stuff.
  * Replaced BuildPrereq by BuildRequires
Cleanup redhat specfile

Fixed a few rpmlint warnings
Updated (mostly) to Fedora Packaging Guidelines
Follow Fedora Packaging Guidelines in java subpackage
No need to edit collectd.conf anymore.

This was fixed by in commit 25fa4ad
Quote arguments
Allow for conditional compilation of plugins

To enable/disable a plugin you can toggle the
%define for that plugin at the top of the specfile.
You can also pass the plugin as argument to rpmbuild,
for example:
rpmbuild -ba --without rrdtool
or:
rpmbuild -ba --with rrdcached
RedHat specfile: updated for 5.2.0

Also includes a couple of cleanups mentioned in github#186.
redhat/collectd.spec - typo.
RedHat RPM spec: package php-collection/collection3 independently
RedHat RPM spec: bump release number
RedHat RPM spec: remove unnecessary dependency on libstatgrab
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>
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>