PepsiCo has lifted its forecast for underlying annual earnings after an increase in second-quarter profits.