The association between mental health and cognitive ability: evidence from the Understanding Society survey