Archive JSON: Allow missing logs to be skipped

In the case where Nagios is down at the time of log rotation, an archive
file may not have been created. If the archive utilities encounter this
case, they used to quit trying to read any log files. This commit fixes
that by just skipping missing log files.
Archive JSON: Fixed bugs calculating availability

This commit fixes serveral bugs calculating availability in the archive
JSON CGI.

1. The first bug was that the incorrect state was being used to calculate
   the availability for the period between the last log and the end of
   the availability query time.
2. The second bug was that if there were no log entries for the availabilty
   query window, all availability durations would be zero.
3. The third bug was that for hosts, the availability calculation was
   incorrectly setting a psuedo initial state when there was initial
   state data available.