Cusp-core dichotomy of elliptical galaxies: the role of thermal evaporation