Device and method for heat-treating steel wires