Neural Empirical Bayes: Source Distribution Estimation and its Applications to Simulation-Based Inference