Degree of cognitive impairment and mortality: a 17-year follow-up in a community study