Duration of major and minor depressive episodes and associated risk indicators in a psychiatric epidemiological cohort study of the general population