More than 6,000 detained in Turkey after failed military coup