Subnanosecond electron beams formed in a gas-filled diode