Quantum plasmonic theory of hot carriers generated in metallic nanoparticles