Fix comparing materials
Check if base method QSGMaterial::compare in all cases and not just when the other properties of the material are not equal.
This is the same logic used in shadowedborderrectanglematerial.cpp
Fix weird bugs where a material is shared between multiple elements creating visual glitches.