While pledging to secure the release of hostages held in Gaza by any means necessary, Prime Minister Benjamin Netanyahu of Israel said of the cease-fire talks with Hamas: “I don’t know how long it will take.”