Stop GIFs when image views are removed from superview

Otherwise we can see memory leaks.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Use weak-memory hash/map tables (instead of mutable arrays)

Should be slightly more efficient and less prone to array indexing
errors.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Remove unused method

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Release CGImageSourceRef when stopping GIF views

Fixes a memory leak.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Don't block main thread when starting GIFs

The CG functions aren't exactly cheap. This speeds things up quite a
bit.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Merge pull request #1 from stephencelis/master

Fix memory/speed issues