Fix artifacts when saving vector layers into PNG files
This patch has two parts:
- KisShapeLayer should block the updates of the shape-canvas. When shapes are added to the layer, they initiate shape manager updates. That is not what we want, because all the rendered pixel data has already been copied in initShapeLayer() call.
- Add a sanity check in KisDocument::initiateSavingInBackground(). Theoretically, there should be no pending updates after cloning operation. But if they still appear somehow (which is a bug), just force them wait until they complete their execution.
BUG:404976
CCBUG:404742