After a painful defeat to President Recept Tayyip Erdogan, Tukey's main opposition has elected a new leader for the first time in 13 years.