Adiabatic Losses and Stochastic Particle Acceleration in Gamma-Ray Burst Blast Waves