Formation of Intense Attosecond Pulses in the Sequence of a Resonant Absorber and Active Medium of a Plasma-Based X-Ray Laser Modulated by an Optical Field