To secure Gaza ceasefire, dealmakers overcame enemies’ deep distrust