The effect of socioeconomic status on outcomes for seriously ill patients: a linked data cohort study