In situ active chlorine generation for the treatment of dye-containing effluents