lib: factor common long-running plugins code

This creates a new module oddly named `Ketrew_long_running_utilities`
which contains things done in every long-running plugin so far.

In the process, LSF and Daemonize backends got more “precise” about
setting a target as “failed.” The previous code was sometimes setting as
failed a target even if it was technically succesful.
Merge pull request #23 from hammerlab/long_running_factorization

lib: factor common long-running plugins code