The role of family functioning and self-esteem in the quality of life of adolescents referred for psychiatric services: a 3-year follow-up