Association of long-term body weight variability with dementia: a prospective study