hash: Get rid of the remaining hash implementation

Oh, look, there already is a generic library that implements common
algorithms in reusable ways! I know, let's not reinvent!

Using glib has the nice side-effect of the hashtable actually being,
like, useful and feature-rich, and has a sane view on memory management.
And not that this is a big new dep - your bloody init system probably
even depends on it.

Not that naemon really works with a sane memory model - my god, the
query handler API is incompatible with any memory that Isn't leaked‽ -
but still, it could be used for greatness in the future.

Signed-off-by: Robin Sonefors <ozamosi@flukkost.nu>
log: Fix security issues from variable formating strings

Signed-off-by: Robin Sonefors <ozamosi@flukkost.nu>
checks: Read check results in O(log n) instead of O(n)

By letting someone who isn't an absolute amateur implement a dynamic
buffer, the size of the dynamically allocated chunks double each time
they need to be reallocated, which gives the performance improvement
from the subject.

Not bad for a patch that almost exclusively removes code.

Signed-off-by: Robin Sonefors <ozamosi@flukkost.nu>