Two Israelis are killed in Jerusalem by a Palestinian who was later shot dead by police, hours before another Israeli was wounded in a similar attack.