ENH Debug mode

Currently computes the hash of Tasks repeatedly and checks that it has
not changed. Eventually might grow to other checks.