President Trump’s cancellation Monday of an agreement for a sweeping trade deal with Asia began recasting America’s role in the global economy, leaving an opening for other countries to flex their muscles.