Donald Trump will need to grasp a web of shifting alignments across the Middle East and North Africa.