The price of oil surpassed $100 a barrel for the first time since July after attacks on oil facilities and ships in the Middle East threatened to debilitate an already weakened supply chain.