Turkish riot police have used tear-gas grenades and water cannon to disperse more than 2,000 people demonstrating against new internet restrictions.