Bayesian adjustment for preferential testing in estimating infection fatality rates, as motivated by the COVID-19 pandemic