On the Consistency of Graph-based Bayesian Learning and the Scalability of Sampling Algorithms