Police in Turkey have arrested Istanbul's mayor Ekrem Imamoglu - a key rival of President Recep Tayyip Erdogan - as part of an investigation into alleged corruption and terror links.