A genial consensus dominated Washington for decades that America’s century of greatness was built on largely unfettered free trade, generous immigration and an aggressive foreign policy that positioned the U.S. as the worldwide enforcer of those norms.