Use `Mutex` instead of a `RefCell` to acquire/release instance buffers (#7291)

This fixes a panic happening when releasing an instance buffer.
Releasing the buffer happens on a different thread but the borrow
checker was not catching it because the metal buffer completion handler
API doesn't have a `Send` marker on it.

Release Notes:

- N/A
659423a4a1Antonio Scandurra committed on 2/2/2024, 4:53:07 PM· committed by GitHubparent074acac
1 file changedLine totals unavailable