Shaping of X-ray Pulses via Dynamical Control of Their Interaction with a Resonant Medium