Add index for JobStatus getByClassAndOwner
Optimize uniqueByOwner job query, delete old failed jobs