First try at a GIF loader.
Major re-write; images load faster and bit-math is speedy.
Fixed a few bugs; most GIFs found in the wild will now load.
Better error reporting, integrated Josh's suggestions, and moved a few dubiously-named variables around.
Minor cleanup; use an inline function for clearmem(), and replace a few more pow()'s with shift arithmetic.
Merge pull request #897 from sorlok/gif_load

Animated GIF decoder.