Cosmic-Ray Transport and Acceleration. II. Cosmic Rays in Moving Cold Media with Application to Diffusive Shock Wave Acceleration