A sell-off hit Wall Street after President Donald Trump said tariffs he had announced earlier on Canada and Mexico would take effect within hours.