BEIJING—China’s economic activity cooled across the board last month, undoing a brief surge earlier in the year and raising questions about the economy’s vitality even before higher U.S. tariffs start to bite. Factory production, retail sales and investment in fixed assets all slowed in April, coming in below market expectations, according to government data released Wednesday. Some economists see further headwinds for the world’s second-largest economy, given the trade fight with the U.S. is likely to damp external demand…