Created by: albertjan
should remove from "active", "wait", "delayed" and "paused" when it's not on "failed" or "completed". it was always deleting from the ZSET. And it also used the wrong key. It might be a good idea to add some more unit tests for this function.