We need a way to keep track of the available history which allows us to open a snapshot at a point-in-time for new storage transactions. Ideally, the best spot for this would be in the KVEngine as a sorted map keyed with a Timestamp that holds a shared_ptr to the StringStore.
Having this available history also lets us determine what the oldest timestamp should be.
As long as there are other open storage transactions with active snapshots, those snapshots must be kept in the available history map until the last storage transaction closes its snapshot and notifies the KVEngine to allow the KVEngine to clean up the available history map appropriately based on the reference count and oldest timestamp.
When a transaction closes its snapshot, it's also going to drop its shared_ptr references to any StringStores it held onto. If the snapshot that's being closed was the last reference (excluding the reference from the available history map) to any of the StringStores it held onto, then we must notify the KVEngine so that it can remove the appropriate StringStores from the available history and update the oldest timestamp appropriately.
Note: As StringStore's aren't timestamped when merged in today, we can temporarily assign each consecutive merge an incrementing timestamp to be able to avoid collisions in the available history map.