Herschel observations of the Sagittarius B2 cores: Hydrides, warm CO, and cold dust