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.
cur_file.c:268: warning: '__value_data' may be used uninitialized in this function
cur_file.c:268: warning: '__key_data' may be used uninitialized in this function
cur_file.c:268: warning: '__value_size' may be used uninitialized in this function
cur_file.c:268: warning: '__key_size' may be used uninitialized in this function
cur_file.c:268: warning: '__recno' may be used uninitialized in this function
Merge branch 'develop' into memrata
Merged with a develop version that has updated XXX_APP and XXX_RET flag
handling, remove the workarounds.
When skipping past a deleted key, don't forget to set the key's length.
Do the comparison before the remove, merging #611 makes keys unavailable
after a remove.
Try and be more consistent about referencing the cursor key, always use
(struct kvs_record *)->key instead of mixing cursor->key and r->key.
Use symbols for abort/commit, makes it easier to debug.
Update the kvs_dump function, I need it for debugging.
When checking the primary cache as part of handling overwrite=false,
discard the record we read, it's only interesting if it doesn't exist,
we don't want to actually use it for anything.

Use [space] as a blank remove tombstone, it's easier to debug.
Use "entries" consistently for the number of entries in a record.
spelling typo
Merge branch 'develop' into memrata