Is visual function associated with cognitive activity engagement in middle-aged and elderly individuals? A cross-sectional study