Fix NPE when solver is killed by the competition framework while the solver cleans up the learned clauses
When the competition framework stops the solver, a new thread is created, which displays some stats about learned clauses.
If the solver is cleaning up the set of learned clauses at that moment, the solver will throw an NPE, because the iterator on the learned clauses will try to access a constraint that has been removed.
We need to find a nice fix for that problem that will not slows down the solver during the search.
The issue mainly appears in the MAXSAT evaluation, in which the size of the benchmarks is small, thus the cleaning of the learned constraints very frequent because of the "wall" feature.