Wrap the btree cursor operations with code that saves/restores the cursor
key/data information, move the handling of WT_CURSTD_{KEY,VALUE}_{APP,RET}
flags out of the btree code and into the cursor code.   Reference #607.
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.
Clear "key set" flags in LSM if searches fail.
Merge pull request #611 from wiredtiger/cursor-resolve

Cursor success/failure handling.