Cognitive ability as a moderator of the association between social disadvantage and psychological distress: evidence from a population-based sample