Apparatus for magnetic processing of liquid media