Fix some details in check_backend_integrity().
Fix timeout setting when it is zero.

In particular, this bug caused the checker to fail when it required
more time than the task timeout.