Associations between diet, cognitive function and dementia risk in UK adults