perf(next-custom-transforms): Replace non-`Sync` `Rc<DashMap<_, _>>` usage with `Rc<RefCell<FxHashMap<_, _>>>` (#75534)
This is a follow-up to https://github.com/vercel/next.js/pull/75007
`DashMap` is needed for situations where you have many threads (or tokio tasks) modifying the same data at the same time. It introduces a lot of memory and CPU overhead to create individually lockable `RwLock` shards. This type of data structure implements `Sync`, indicating that it can be shared between threads.
`Rc` is not `Sync` (`Arc` is `Sync`), so wrapping `DashMap` in `Rc` doesn't make a lot of sense: You're paying a pretty high overhead for the ability to share data between threads, and wrapping it in something that does not support sharing data between threads.
This visitor code is entirely single-threaded, so just use `Rc<RefCell<FxHashMap>>` instead. `RefCell` is a very cheap single-threaded version of a `Mutex`. `FxHashMap` is just a `HashMap` with the faster `FxHash` algorithm used.