SkJpegCodec: Detect multi-picture format gainmaps

Add support for Multi-Picture format gainmaps produced by iPhone
cameras.

To determine if the gainmap is present, first check to see if the
image has MPF metadata. Instruct the decoder to retain MPF tags (as
it does for ICC and EXIF tags already), and early-out if it does not
find MPF tags or if they cannot be parsed.

Once it is know that there are MPF tags, extract SkStreams for the
MP images. Then, for each MP image, use SkJpegSegmentScan to search
for XMP metadata. Search that XMP metadata for a node that indicates
that the MP image is a recognized gainmap image.

Bug: skia: 14031
Change-Id: I3c2aa2c95e02bf4e4539692bc052fd05d2b92537
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/625925
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
12 files changed