The president’s abrupt announcement of steep tariffs on European, Canadian and Mexican imports capped a week of whipsaw statements.