PepsiCo raised its full-year earnings outlook after beating Wall Street’s estimates for third-quarter earnings and revenue.