Sleeping six hours or less in middle age is associated with an increased risk of dementia, a new study says