Empirical Bayes Estimation for the Stochastic Block Model