Add Metal support for dynamic buffers.

Implements dynamic buffers as subbuffers of a larger allocation. As
we map and unmap, we change the subbuffer to ensure we don't overwrite
previous data. Buffers larger than our standard allocation are assumed
to do their own subbuffer management.

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