Cooling or heating the neck portion of preforms