Thermodynamic properties of hot nuclei within the self-consistent quasiparticle random-phase approximation