In situ measurements of strains and stresses in GaN heteroepitaxy and its impact on growth temperature