Cognitive trajectories in prediabetes and diabetes : a population-based cohort study