Stability of ferrofluid cylinder in an azimuthal magnetic field: theory and experiment