A McKinsey & Company subsidiary agreed to pay nearly $123 million to resolve an investigation into a scheme to bribe government officials in South Africa, the U.S. Department of Justice said.