Kinetics of magnetic flocculation. I. Flocculation of colloidal particles