Add alternate image pinning API

A smaller version of https://skia-review.googlesource.com/c/skia/+/651760
which eventually aims at moving the GPU code out of SkImage_Raster
and others.

It introduces a type() method to be able to correctly downcast
SkImage_Base subtypes.

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