The Hershey Company has reported a fall in earnings for its third quarter and lowered its full year estimates.