[graphite] Add Resource class to be base class for cached objects.

This updates all current resources that are tracked on the CommandBuffer
to use the new Resource class.

Bug: skia:12754
Change-Id: If96f47972c3b8acc43a9926cafa82c2860e01371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/490276
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
20 files changed