core: change ownership of debug log file before dropping privileges refs #3521

Opening the debug file, non-existing, will create it as root, before
actually dropping the privileges (644). When the core receives a SIGHUP
later, the non-privileged user cannot write to the debug file anymore,
bailing early.
In order to solve that, it's required to chown the debug log file to the
icinga user before dropping privileges.
possible fix for CVE-2012-6096 (nagios), added Icinga specific fixes

refs #3532
Merge branch 'mfriedrich/core' into next