Trajectories of cognitive function prior to cancer diagnosis: a population-based study.