Quantum-size effects in the thermodynamic properties of metallic nanoparticles