I'm not sure this is supposed to be thread safe, I've been able to make the test crash by hammering the map with Insert / Remove calls from multiple threads.
Similar to the IVector interface, it looks like this is usually implemented directly in the SDK, using C++ STL wrappers. I think we should implement it with some shareable code as well, like we did for IVector (although it's going to be difficult to be truly compatible with STL containers if we ever need to be).
Then it's not obvious to me that our `rb_tree` is the best tool to implement this either, some methods seem to be inconvenient. It also looks like the SDK provides both ordered or unordered IMap variants.
What about something like https://gitlab.winehq.org/wine/wine/-/merge_requests/8749 instead?