Teachers who work longer hours are slightly more likely to stay in the profession, according to new research