Enable generating SkImage with the same uniqueID in SkImageGenerator subclass

Enable reusing uniqueID when instantiating SkImageGenerator subclasses enables
using uniqueID in client code to cache generated bitmaps with no need to keep
the reference to SkImageGenerator.

This is a bug fix for out of memory cause in chromium and 100% CPU usage
described in issue 165750#13:
- cache uses SkImage::uniqueID() to cache decoded bitmaps.
- every animation loop creates new SkImage instances.
- after decoding, bitmap copies are added to cache, filling it up with
duplicates of previous loops frames.

BUG=165750

Blink patch that depends on this:
https://codereview.chromium.org/1925533003/
"High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations."

Review-Url: https://codereview.chromium.org/1928403002
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index 1a46f6b..3712a92 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -251,7 +251,11 @@
     }
 
 protected:
-    SkImageGenerator(const SkImageInfo& info);
+    enum {
+        kNeedNewImageUniqueID = 0
+    };
+
+    SkImageGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID);
 
     virtual SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM);