Diabetes 'impact on brain power'