Swiss food giant Nestle said it has reached an agreement with European retailers over a months-long pricing dispute.