Search for long-lived particles that decay into final states containing two electrons or two muons in proton-proton collisions at s =8TeV