Association between dementia and infectious disease: evidence from a case-control study