Predictors of emergency department attendance by people with dementia in their last year of life: retrospective cohort study using linked clinical and administrative data