Thousands of people in Istanbul have protested against a potential law which they fear could lead to the mass killing of dogs.