More than 50,000 people have either been detained or dismissed from their jobs, in the wake of the failed coup in Turkey. They include teachers, judges, police and the military.