JSON CGIs: Added authenticated username to results object.
Status JSON: Added Nagios Core version to programstatus object
Fixed bug #438: Reloads during downtime causes wrong availability calculations

The log files only indicate whether a host or service has entered or exited
a period of scheduled downtime, and not which downtime has been entered.
If you have two overlapping downtimes, there will only be two log entries:
one when the first downtime starts and one when the second downtime ends.
However, when Nagios Core restarts, it adds a log entry for any downtime
in effect when it starts. This means that for a downtime that started
before Nagios Core was stopped, there will be two "entering downtime"
logs.

Previously the availability calculation used a downtime depth to determine
where the host or service was in downtime. This would cause incorrect
availability calculations when a downtime had already started and Nagios
Core was restarted because the downtime depth would be incremented twice
because of the two logs, but would only be decremented once because of
the send "exiting downtime" log. This commit fixes this issue by simply
keeping track of the state of the downtime, rather than it's depth.