Relationship between the Thyroid Function and Cognitive Impairment in the Elderly in Japan