lib/dkhash: *really* fix memory leak and possible loss of objects

The previous fixes to dkhash_remove() were mangled beyond usefulness
from the original patch by yours truly. This additional patch fixes
it while retaining the nagios codestyle intact.

Mea culpa.

Signed-off-by: Andreas Ericsson <ae@op5.se>