Isotope effects on antiproton and muon capture by hydrogen and deuterium atoms and molecules