Continual Learning in Modern Hopfield Networks with an Application to Diffusion Models