Determinants of place of death: a population-based retrospective cohort study