Two Palestinian youths who tried to stab Jews in East Jerusalem and the occupied West Bank have been shot dead, Israeli security forces say.