fix a gif decoder bug

if a gif was decoded and the image had no graphics extension, it was
treated as an error. it's not an error, because graphic extension blocks
are optional.
add tests and examples for gif encoding/decoding
update readme with gif