Fix race condition in projection cache in KisLayer
When indirect painting is disabled (or a mask is removed) the layer
becomes projection-free, that is, projection device should be recycled.
The problem is that the projection may still be accessed by worker
threads, therefore the actual cleaning of the devices should happen in
an exclusive context.
The patch adds a special exclusive spontaneous job, that does all the
cleaning when all workers are guaranteed to be idle/paused.