Cargill Inc. reached a settlement with McDonald’s Corp. over antitrust claims by the fast-food giant, which has alleged price fixing by beef suppliers.