Contribution of pulsars to cosmic-ray positrons in light of recent observation of inverse-Compton halos