Misc op5 fixes

This is a bit of a mixed bag of commits.

The first half are proper bug fixes that I've ported from op5's patchqueue for nagios ( http://git.op5.org/gitweb?p=monitor%2Fnagios.git;a=shortlog;h=HEAD )

The latter half were written while packaging naemon core. They are there to "make more things more standard".