Rename GlobalCacheEntry to ConstantCache

These caches are specifically used for caching constants, so name them
as such so it's more clear what they mean.
Fix thread safety issue with constant caches

The problem here is that for example the module the constant is scoped
under can change, for example if code does something like this:

self.class::SOME_CONSTANT

If the target class here is variable, it would have to refer to
different constants. The problem with the old strategy is that there is
a race condition, because the contents of the cache can't be changed
atomically. So "under" might have already been updated, while the
referred value isn't or vice versa.

This new strategy actually sets up a reference to a cache entry, much
like how the inline cache works for method calls. When retrieving a
value, it uses this cache object so things don't change while working
with it. When the cache is invalid / needs to be updated, we allocate a
new cache entry and replace the old one after making sure it's properly
initialized.

We also change the JIT to teach it about these new types of objects so
we can use regular offsets, instead of working with global addresses
like we did before.
Merge branch 'constant_cache_thread_safety'