School performance and hospital admission due to unipolar depression: a three-generational study of social causation and social selection