US chocolate group Hershey has raised its forecast for full-year earnings after booking an increase in third-quarter sales and profits.