The Olympic committee says genetic testing will be used for women’s events in 2028, ending a long and noisy debate over fairness.