[graphite] Move work and resource tracking to CommandBuffer base class.

Also adds test of texture copyback to CommandBufferTest, and
endEncoding() to BlitCommandEncoder.

Bug: skia:12466
Change-Id: I57e4646aacc1d950cc16b70d7feeced1a04e6867
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462078
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
6 files changed