[graphite] Track failed Buffer mappings to cause snap() to return null Recording

After https://skia-review.googlesource.com/c/skia/+/841836, writing
to a failed mapping Vertex/IndexWriter would discard data to avoid
crashing, but then it would silently carry on.

This tracks when the mapping fails to either fail the Recording snap
or the Context initialization (for static buffers). It also adds some
missing checks for bad mappings (particularly when the Buffer is not
null but the mapped pointer is null), and some early-outs when
creating a DrawPass.

Bug: b/334461625
Bug: b/335848866
Change-Id: I7bece5246c80cf901b3b966a239ca88905a32eb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/843376
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
6 files changed