(imagemagick_compute_animated_image): Implement a simple cache