Shock stability criterion in relativistic hydrodynamics and quark-gluon plasma hadronization