The Iran war and Trump's criticisms of allies have led Asia-Pacific countries to recalibrate their calculations.