Search for top-squark pairs decaying into Higgs or Z bosons in pp collisions at √s=8 TeV