refactor ErrorHandler code

The ErrorHandler takes care of job state transitions from ***failed
to either ***cooloff (picked up by RetryHandler) or exhausted (picked
up by JobArchiver). Introduce an intermediate state retrydone, to be
entered before a job reaches eshausted. This allows smarter retry
mechanisms that can decide for themself when to stop retrying.

For current retry mechanisms this is completely transparent and
stays inside the ErrorHandler, no changes are needed.

Also change the paused job kill script to switch a job to retrydone
instead of killed, this ensures that input files will be failed
and are addded to the ACDC workflow.