Thermal effects on sudden changes and freezing of correlations between remote atoms in a cavity quantum electrodynamics network