NLL+NNLO predictions for jet-veto efficiencies in Higgs-boson and Drell-Yan production