[Bug Fix] Fixes product setMasterVariant logic

When you add a master variant to a product and then set a different
variant as master. It will fail, because now both would have isMaster
being true.

This PR fixed it. Also added a test for it (and updated composer.lock, it was outdated).