The official who steered the U.N.’s diplomacy in Syria for nearly seven turbulent years is resigning