Association between Social Activities and Cognitive Function among the Elderly in China: A Cross-Sectional Study