Image Preloading and limited stored images

- Limited the amount of images and animations that can be stored in
memory (to avoid the program using too much memory). Up to 20 images and
6 animated gifs stay in memory when navigating with the next/prev image
buttons.
- Image Preloading - when using the next/prev image buttons the image
after the one just loaded is preloaded ready (can be turned off).