Search for direct pair production of scalar top quarks in the single- and dilepton channels in proton-proton collisions at sqrt(s) = 8 TeV