Fix dispose calculations for animated GIFs

- use correct dispose mode
- only apply the dispose on extent of the previous frame
- handle transparency between frames (fixes issue #634)