[rust png] Create `ICCProfile` from `cHRM`, `gAMA`, `iCCP`, `sRGB`.

This CL adds support for asking the Rust decoder about
color-space-related PNG chunks and then translating them into
`SkEncodedInfo::ICCProfile`.

This CL also ensures that `SkPngRustCodec` matches how `SkPngCodec`
strips 16-bits down to 8-bits for grayscale and grayscale+alpha images.
This is because the `ICCProfile` is primarily needed for future
`skcms_Transform` calls (see http://review.skia.org/889151/3) and
`skcms` doesn't currently handle G16 or GA1616 inputs.

Bug: chromium:356874896
Change-Id: I51d85da16f89e50893b4c36c58517a0ff4c863e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/886677
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ɓukasz Anforowicz <lukasza@google.com>
5 files changed