Construction is nearing completion on a natural gas pipeline linking Iran and Pakistan, a project that portends a huge geopolitical shift. As regional powers strengthen ties in this key energy market, they’re looking to China, and away from the West.