Track failures separately from attempts

This makes tasklogs of tasks that have been restarted a lot easier to
handle and is also a good first step towards treating user-initiated
interruptions of work differently from actual failures.
I just noticed this, `is not` should be `!=`.  Identity testing may work in many cases for this but it won't work in all of them.