Magnetic separators for liquid mixtures with automatic cleaning