Revert "Remove redundant check for valid task object."

This reverts commit 8337795ff714d04443a7666faa7916641021fca7.
Added more templates.
Fix deadlock when adding/removing acknowledgements.
Fix another deadlock.
Fixed deadlock.
status.dat/objects.cache: check_interval/retry_interval should be in minutes.
Removed dummy timeperiod definition.