Prevalence and risk factors of depression in middle-aged and older adults in urban and rural areas in China: a cross-sectional study