Body mass index, waist-to-hip ratio and cognitive function among Chinese elderly: a cross-sectional study