Mathematical Foundations of Graph-Based Bayesian Semi-Supervised Learning