Update giflib to 5.1.1 (AOSP hash)

This also disables warnings in giflib and fixes
compile warnings in icu, in order to fix a skia
bug.

BUG=skia:4220

Review URL: https://codereview.chromium.org/1314633002
diff --git a/DEPS b/DEPS
index 50707d4..28251d0 100644
--- a/DEPS
+++ b/DEPS
@@ -18,7 +18,7 @@
   "third_party/externals/zlib"    : "https://chromium.googlesource.com/chromium/src/third_party/zlib@4ba7cdd0e7bf49d671645264f839838fc56e1492",
   # NOTE: If we update libpng, we may need to update the generated file at third_party/libpng/pnglibconf.h
   "third_party/externals/libpng"  : "https://skia.googlesource.com/third_party/libpng.git@070a616b8275277e18ef8ee91e2ca23f7bdc67d5",
-  "third_party/externals/giflib"  : "https://android.googlesource.com/platform/external/giflib.git@android-5.1.0_r3",
+  "third_party/externals/giflib"  : "https://android.googlesource.com/platform/external/giflib.git@ab10e256df4f684260ca239905b1cec727181f6c",
 
   "third_party/externals/libjpeg-turbo"             : "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@631e2dd119d49794e3572b6ca3f16ee39d59f372",
   # libjpeg-turbo depends on yasm to compile .asm files
diff --git a/gyp/giflib.gyp b/gyp/giflib.gyp
index e9d9905..f4f8532 100644
--- a/gyp/giflib.gyp
+++ b/gyp/giflib.gyp
@@ -35,7 +35,9 @@
             'msvs_settings': {
               'VCCLCompilerTool': {
                 'AdditionalOptions': [
-                  '/w',
+                  '/wd4996',
+                  '/wd4018',
+                  '/wd4267',
                 ],
               },
             },
diff --git a/gyp/icu.gyp b/gyp/icu.gyp
index d955b19..5142b77 100644
--- a/gyp/icu.gyp
+++ b/gyp/icu.gyp
@@ -63,9 +63,23 @@
             'msvs_disabled_warnings': [4005, 4068, 4244, 4355, 4996, 4267],
             'msvs_settings': {
               'VCCLCompilerTool': {
-                'RuntimeTypeInfo': 'true',
-                'AdditionalOptions!': [ '/GR-' ],
-                'AdditionalOptions': [ '/EHsc', '/GR', '/w', ],
+                'AdditionalOptions': [ '/EHsc', ],
+              },
+            },
+            'configurations': {
+              'Debug': {
+                'msvs_settings': {
+                  'VCCLCompilerTool': {
+                    'RuntimeTypeInfo': 'true', # /GR
+                  },
+                },
+              },
+              'Release': {
+                'msvs_settings': {
+                  'VCCLCompilerTool': {
+                    'RuntimeTypeInfo': 'true', # /GR
+                  },
+                },
               },
             },
             'all_dependent_settings': {
diff --git a/src/codec/SkCodec_libgif.cpp b/src/codec/SkCodec_libgif.cpp
index 1200441..1d6164e 100644
--- a/src/codec/SkCodec_libgif.cpp
+++ b/src/codec/SkCodec_libgif.cpp
@@ -67,11 +67,7 @@
  * It is used in a SkAutoTCallIProc template
  */
 void SkGifCodec::CloseGif(GifFileType* gif) {
-#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0)
-    DGifCloseFile(gif);
-#else
     DGifCloseFile(gif, NULL);
-#endif
 }
 
 /*