Lyapunov functionals for reaction-diffusion equations with memory