356: Add generic ranges to buffer mapping api and make it safe. r=kvark a=lachlansneff
[Rendered](https://charted.space/notes/wgpu-rs/wgpu/struct.Buffer.html)
The safety issues with the current api (being able to unmap while still holding a slice to mapped data) are fixed by having `get_mapped_range` and `get_mapped_range_mut` return `BufferView` and `BufferViewMut`, which notify the buffer that those ranges are no longer being used when they're dropped. `Buffer.unmap` asserts that the list of mapped ranges is empty, therefore it is safe.
Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>