Export animated gif of animations

Hi,

I had fun adding a function to export the animations as animated gif. 

Gifs are cool but there are some downsides: 
* it adds three js files for [the library](https://github.com/antimatter15/jsgif) (sadly it's not on npm). They're not very big though (around 40Kb) 
* it freezes the browser while it renders the gif (not for a  long time, but still). It's probably possible to use web workers to smooth everything up, I might try to implement that.

Anyway if you don't want to merge this for these reasons, that's cool I was just trying this for fun :metal:.