Theory of radiation-induced and thermal coarsening of the void ensemble in metals under irradiation