The Cognitive Impact of Chronic Diseases on Functional Capacity in Community-Dwelling Adults