Thermoelastic damping in layered micromechanical resonators