A political deal has agreed the text of a new EU regulation on the composition of infant formula, baby food, diet replacements and special medical foods.