Thousands of people have taken to the streets in Turkey to demonstrate against the detention of journalists and the closing down of media outlets.