Fixed wrong mode of gif image.
In case of L mode and small image.
Added test case for gif image (mode L): optimization turned on, but not needed.
Fixed test_optimize_full_l gif file test case.
Fixed test_optimize_full_l test case for python2.
Merge pull request #843 from uvNikita/gif_mode_fix

Fixed wrong mode of gif image.