A former Taiwan lawmaker who has advocated closer ties to China won the contest to become the leader of the island’s biggest opposition party.