avcodec/gifdec: factorize interleave end handling out