Checking for valid colorType, alphaType, colorSpace in SkCodec

* Refactor to share code between SkPngCodec and SkWebpCodec
* Didn't end up sharing with SkJpegCodec but did refactor
  that code a bit
* Disallow conversions to F16 with non-linear color spaces
* Fail to decode if we fail to create a SkColorSpaceXform
  (should be an assert soon).  We used to fallback on a
  legacy decode if we failed to create the transform.
* A bunch of name changes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003

Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9
Review-Url: https://codereview.chromium.org/2319293003
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp
index dcc25b8..1e6e300 100644
--- a/src/codec/SkGifCodec.cpp
+++ b/src/codec/SkGifCodec.cpp
@@ -450,9 +450,8 @@
 SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr,
         int* inputColorCount, const Options& opts) {
     // Check for valid input parameters
-    if (!conversion_possible(dstInfo, this->getInfo())) {
-        return gif_error("Cannot convert input type to output type.\n",
-                kInvalidConversion);
+    if (!conversion_possible_ignore_color_space(dstInfo, this->getInfo())) {
+        return gif_error("Cannot convert input type to output type.\n", kInvalidConversion);
     }
 
     // Initialize color table and copy to the client if necessary