Long-Term Effect of Diabetes and Its Treatment on Cognitive Function