Atomic memory effects in the quantum theory of laser