An alliance with the president was the Israeli prime minister’s selling point. Now it may be his downfall.