A Combinatorial Characterization of Self-Stabilizing Population Protocols