This is very similar to `__wt_row_key_get`, which is used to get a key for log records.  Maybe that can be generalised to take a `WT_INSERT` instead of a btree cursor, and the code can be shared?