Ekrem Imamoglu, the mayor of Istanbul, has been arrested just days before becoming presidential candidate.