Beijing’s long-running effort to build out its energy sources is getting fresh momentum from the war in the Middle East.