Plant for the thermal treatment of material and operation process thereof