Hershey veteran J.P. Bilbrey is to retire as the US confectionery giant's chairman.