Walmart, the country’s largest retailer, said it will stop locking up “multicultural” hair and beauty products in display cases in a move that civil rights activists and academics say is long overdue.