Multiscale Analysis of Phase Transformations in Thermoelasticity