HPCC-12563 Clean up scheduling workunits that are failed then deleted

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>