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)
Could we have these five `assert(a == b)` as `self.assertEqual(a, b)`?