Israel has passed a law which will make the death penalty by hanging the default punishment for West Bank Palestinians convicted of murdering Israelis.