gifenc: support resolutions up to 65535x65535

Maybe someone can add a check in the second gif encoder (rgb24), because I'm not sure where it should be added.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
