Effects of physical activity on cognitive function among patients with diabetes in China: a nationally longitudinal study