Electrostatic forces on grains near asteroids and comets