Move ralloc allocations and frees for BOs into the critical sections protected with mutexes. This fixes several double-free and use-after-free crashes that happens sometimes when using the simulator to run Vulkan CTS tests, specially when these tests involve multithreading, like `dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small`. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27070>