The head of Israel’s Mossad traveled to Qatar on Friday to try to finalize a cease-fire deal with Hamas, according to a person familiar with the matter.