Acceleration and deceleration of convoy electrons in grazing-ion-surface collisions