Bayesian inference via rejection filtering