Stability analysis of viscous Z-pinch plasma with a sheared axial flow