Cumulative effect of impaired fasting glucose on the risk of dementia in middle-aged and elderly people: a nationwide cohort study