Empirical Bayes estimation for mixture models