test/test-downtime: Updates for core 4 and fixes

The test-downtime.pl script has been updated to check the version of
Nagios Core it is running. If the major version is 4 or greater, all
calculations that previously involved reaper times now ignore the
reaper times. In addition, problems were resolved that were related
to the length of downtimes.