Keep index records ordered as they are stored instead of appending and
sorting the entire record vector for every insert. This avoids repeated
O(n log n) work during bulk object-store writes while preserving the
ordering by index key and referenced object-store key.
Add a text test covering out-of-order index writes with repeated index
keys, so cursor iteration still observes the required record order.
Wrap the SerializationRecord (Vector<u8, 1024>) in an OwnPtr so that
each ObjectStoreRecord is only ~16 bytes instead of ~1040+ bytes.
This makes Vector operations on the records list dramatically cheaper
since memmove now shifts pointers instead of kilobyte-sized buffers.
To allow these to be reverted, we store mutation logs per object store
in the scope of a readwrite transaction to track the modifications that
were made by it. If a revert is needed, the log is played in reverse to
bring us back to the original state.