Medical and psychiatric risk factors for dementia in veterans with and without traumatic brain injury (TBI): a nationwide cohort study