The US is closing two embassies in the Middle East and reducing its diplomatic presence in the region.