Exponential stability of the wave equation with memory and time delay