Cohort study of a specialist social worker intervention on hospital use for patients at risk of long stay