Mental disorders and termination of education in high-income and low- and middle-income countries: epidemiological study