Run privileged check command without init

There’s no apparent reason to care about init for
this check, so run it and exit before doing init.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Refactor *_work and execute_graph.

The boilerplate part of the *_work functions is moved to a separate
function named run_thread. This function calls the actual *_work
functions.