logging: Fixed changing ownership on debug file

Patch based on nagios ba2c19d, by Eric Stanley <estanley@nagios.com>

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
xodtemplate: Inherit hourly value from template

Patch based on nagios c49bd4b, by Scott Wilkerson
<swilkerson@nagios.com>.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
downtime: Notify when flexible downtimes expire

Patch based on nagios 210fbbb, by Dan Wittenberg.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>