US confectionery giant Hershey has downgraded its sales outlook for 2017, blaming a tough retail climate.