Fix merging of two shape layers (also after scaling)
- Implement correct reordering of the shapes according to zIndex (see KoShapeReorderCommand::mergeDownShapes()). Added homogenizeZIndexes() function, that can be reused in other cases for linearizing the indexes
- KisShapeLayer should be linked to its own KoShapeManager, otherwise transformations of the layer will not issue updates.
- KisShapeLayerCanvas::updateCanvas() should use toAlignedRect() to handle antialiasing correctly.
The patch also adds a unittest for checking all these bugs :)
BUG:389905