Reland: Decode and encode ISO 21496-1 JPEG images

Decode and encode ISO 21496-1 JPEG images

Add SkJpegMetadataDecoder::getISOGainmapMetadata, to extract the
ISO 21496-1 metadata blob from a JPEG file.

Update SkJpegMetadataDecoderImpl::findGainmapImage to search for
ISO 21496-1 metadata in the base JPEG image.

Update the extract_gainmap function to also search for
ISO 21496-1 metadata. If that metadata is found, and if it indicates
not to use the base image color space for applying the gainmap,
then parse the gainmap image's ICC profile.

Update lots of tests.

This reverts commit 62f369c759947272dfdd2d8f060afadbcc361e79.
Reason for revert: Did not break build
Original change's description:
> Revert "Decode and encode ISO 21496-1 JPEG images"
> This reverts commit 977a43773f7ce1c6e69cf966deb534311b3a18b4.
> Reason for revert: Forgot to add SkGainmapInfo.cpp to Chrome build.
> Original change's description:
> > Decode and encode ISO 21496-1 JPEG images

Bug: b/338342146
Change-Id: I9637ec62a3ab7f01f26637ddf3bc0139e752431c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/855896
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
11 files changed