fix Issue #312
improve palette handling while saving gif and png
reorganized gif optimize to work with palette parameter
replace custom search with dict in gif optimize
Merge pull request #315 from d-schmidt/master

fix Issue #312 + gif optimize improvement