Conflict in the Middle East has moved from a fringe risk to a top worry for investors unsettled by the prospect of a power struggle in Iran and a protracted regional war, with ramifications for everything from global trade to inflation.