Negative thinking linked to dementia in later life, but you can learn to be more positive