WASHINGTON — When President Obama travels to North Carolina and Europe this week, he will press an argument that could define foreign policy in the last six months of his presidency: that Americans and Europeans must not forsake their open, interconnected societies for the nativism and nationalism preached by Donald J. Trump or Britain's Brexiteers.