This was supposed to be the year that the European Union imploded—the year when the populist revolts that engulfed the U.S. and the U.K. in 2016 would spread to the continent. Yet the EU ends the year in better shape and more united than it has been for years.