A life filled with a carefree attitude and social activity could help reduce the risk of developing dementia in old age, new research suggests.