China’s export growth beat expectations in June, driven by strong demand from non-U.S. markets and a brief easing of trade tensions with Washington.