Issue 21 - Add "abandoned" state for task attempts instead of deleting them when abandoned

Fixes #21

Note: this builds on PR #38, so that should be merged first. Once that is merged you should see fewer changes, and only one commit in here.