Analysis of residual stresses in thermoelastic multilayer cylinders