Move mipmap serialization and deserialization to read/writebuffer

This will allow compilation of SkImage related things (including
Mipmaps) without needing to bring in the PNG codec.

This re-uses the Image serialization and deserialization proc
for the mipmap layers, with the default still being PNG encoding.

It also reduces code size by letting the linker drop out the
WEBP and JPEG encoders in certain circumstances.

Bug: skia:13983
Change-Id: I0249be88e6f97bb8b70bbebf4b5acc5958836bbf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/664177
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
6 files changed