Sensing the charge state of single gold nanoparticles via work function measurements.