Diabetes, air pollution and alcohol consumption could be the biggest risk factors for dementia, a study has found.