Measurement of the mass of the top quark in decays with a J/psi meson in pp collisions at 8 TeV