Stability of periodic orbits in the theorem of Šarkovskii