[metal] Add more checks around command buffer operations
[metal] Add more checks around command buffer operations

Bug: b/212296687
Change-Id: I9f5b5966e7cc497f8c8591463801ef558297f3ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519620
Reviewed-by: Brian Salomon <61fabaaf0876044aeedfd8e351e485c028d69e7b@google.com>
Commit-Queue: Jim Van Verth <509afb0bfbb23ecaaf1fb3323209f531b45e75a6@google.com>

google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia