commands: Keep return values around for external commands and log errors

This patch does not significantly alter program flow. It simply allows us
to log errors encountered from attempted execution of external commands,
which presumably is a good thing.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
commands: Add more granular error reporting for external commands

This patch makes it easier to troubleshoot why external commands
fail by adding more detailed error codes as well as a cmd_error_strerror
function for easy printing. It adds an extra log entry for each failed
command, including malformed commands, commands stemming from OOM errors
etc, as opposed to only logging the fact that those external commands
did not execute properly.

This should hopefully also make it eas(y/ier) to add even better error reporting
and error handling in the future, if necessary.

Signed-off-by: Anton Lofgren <alofgren@op5.com>
core: Disallow zero retry- or check-intervals

If we *do* have zero retry or check-intervals and happen to disable
checks of the type that we have zero intervals for, we'll keep on
scheduling and rescheduling the same checks over and over to run at
the exact same timestamp, which will only cause us to peg the cpu
at 100% and log insane amounts of data to the debug log. Not so hot,
so let's avoid it whenever possible.

Signed-off-by: Andreas Ericsson <ae@op5.se>
core: Run all checks via scheduler

This removes the special-casing we used to have for checks that
were run because we needed to determine dependencies. The net result
is that we get rid of a few special cases and a whole lot of code.

While at it, we also log more carefully what's going on. I needed
that during development, and it may as well stay now that it's there.
If nothing else, it'll provide easy access to debugging material in
case we get bugreports on how checks and notifications are run now
that we've changed that.

The nice thing about this is that we don't have to spend a lot of time
fiddling with special cases, so bugs introduced by this patch are
likely fixed by removing special-case handling code (which tends to
be the least exercised and the most bug-prone anyways).

We also get sensible job-control, now that all checks pass through a
single channel instead of coming in from every which way.

Signed-off-by: Andreas Ericsson <ae@op5.se>
core: Log immediately when processing bad checkresults

When we get checkresults that are for objects we don't know about,
we should say so loudly and clearly. This really shouldn't happen,
but it might if one uses modules to pass on checkresults to the
core for objects that the core knows nothing about.

Signed-off-by: Andreas Ericsson <ae@op5.se>
core: Log when notifications are blocked by modules

Very handy when debugging modules that sometimes block notifications.

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