Organizers worried that the North would spoil the Winter Games in Pyeongchang. But after months of anxiety and failed diplomacy, there was a deal.