Bidirectional associations of intellectual and social activities with cognitive function among middle-aged and elderly adults in China.