Association between frailty and a measure of cognition: a cross-sectional study on community-dwelling older adults