The top political leader of Hamas was holding talks with Egyptian officials on Wednesday about a possible truce in the Gaza war, as the United Nations Security Council separately worked frantically to craft a resolution to suspend the fighting that would not draw a veto from Israel’s staunchest ally, the United States.