A Graph-Theoretic Framework for Understanding Open-World Semi-Supervised Learning