Researchers say they've identified 3 things a person can do in middle age that may help lower the risk of dementia.