Khamenei, Netanyahu and Trump are seeking to secure their legacies — and shape the future of the region