Pathways linking social class to smoking, drinking and psychiatric distress