Here's my last patch for today. I gotta go eat.
This adds a preference to animate gifs, off by default, as well as a command line argument. If you have it off by default and don't use the command line argument on a book that starts with an animated gif, that gif won't animate until you reload by going to a different archive, even after you turn on the preference. There are a lot of problems with the PIL handling of animated images, so the biggest problem is that GIF images won't be subject to resize, enhance, flips, rotations, etc. Non-animated GIF files will still do things like normal.
I'm also attaching combo-patches for the other two revisions I put up today. The names should be somewhat self explanatory, and the descriptions are on those pages.