Marriage may lower risk of dementia, study suggests