Shocklike Dynamics of Inelastic Gases