South Korean legislators passed a bill Tuesday that breaks the iron grip of Apple and Google over their app stores, becoming the first country to rein in the tech giants’ dominance of the mobile app economy.