Measurement of plasma density in the discharge maintained in a nonuniform gas flow by a high-power terahertz-wave gyrotron