Casimir Energy and Thermodynamic Properties of the Relativistic Piecewise Uniform String