Generation of high-power nanosecond pulses in a relativistic backward-wave oscillator in the regime of spatial accumulation of energy