Upstream support for giflib >= 5.1.

DGifCloseFile now takes two arugments.  The second argument appears to be an
optional out-param with more information on failures.

( c.f. http://giflib.sourceforge.net/gif_lib.html )

PS 1 is the original patch we received from google3.  I've updated it a bit to
be pedantically legal C++98.

BUG=skia:

Review URL: https://codereview.chromium.org/860853003
2 files changed