CAIRO/JERUSALEM – Senior figures in Israel’s government have said it is closing in on its war aims of defeating Hamas militarily and the return of hostages seized on Oct. 7. But Hamas’ survival as a guerrilla force and its sway in Gaza may overshadow any deal.