Association between stress hyperglycemia ratio and cognitive function in older patients with diabetes or prediabetes: a cross-sectional study from the NHANES | Synapse