Thermodynamics and statistical mechanics in the special theory of relativity