Should we cache the MemoryIndex instances in a thread local (with a list or something like that)? I lean towards not, since we would then have multiple instances per thread and then then the `indices.memory.memory_index.size_per_thread` setting doesn't make sense. In that case we can just instantiate MemoryIndex directly (not use the custom impl).