Fix a potential race condition in KisRecalculateGeneratorLayerJob
In some rare cases (when the color space of the image changed),
KisGeneratorLayer::update() may call resetCache(), which demands
exclusive access to the paint device. So just make it run exclusively.