[PATCH v4 3/4] thermal: devfreq_cooling: Refactor code and switch to use Energy Model