Fix logic in WT_CURSOR_NEEDVALUE: only copy values if they are not already in the WT_ITEM's memory.

Found by valgrind reporting "Source and destination overlap in memcpy".