On the well-posedness of Bayesian inverse problems