Restore the copy of the key/value as part of entering the API: the reason is
that when a cursor's key or value are pointing at internal memory (which is
what the RET flag indicates), that memory is only safe while the cursor
keeps a page referenced. As soon as the cursor releases the page (which
happens at the beginning of most operations), it could be evicted and the
memory could become invalid.

Make the test for whether or not a WT_ITEM.data field references inside the
WT_ITEM's allocated memory a bit more complicated: overflow items will have
data fields that point inside the allocated memory, not at the start of it.