Istanbul's mayor, who's a key opponent of President Recep Tayyip Erdogan, has been arrested by Turkish police over alleged corruption and terrorism links.