Fix invalidate

There were several problems with the previous implementation. Mainly,
the candidate operations to be removed from the queue were not all
possible operations coming from the submissions, but they were
obtained from the existing submission results in the db. Basically, we
were trying to remove from the queue only the operations that already
ended (because their outcome was in the db).

Moreover, as the EvaluationExecutor waits for a worker after having
extracted an operation from the queue, we need to make sure that we
handle the case where that operation is to be removed as well.