Frailty degree and illness trajectories in older people towards the end-of-life: a prospective observational study