Make cgi's build again

The recent changes to the downtime core functions broke the build
for cgi's. This restores them to good working order.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Added a simple query handler interface, nagios-qh.rb (Dan Wittenberg)