Check to see if cfg[0] == NULL, too -- it's a fast test, and avoids
stepping past the last slot in an empty cfg[].
Fix a bug where we could step past empty cfg[] array slots.
If an underlying data-source doesn't have a truncate operation (for
example, the STEC KVS store), implement a slow one using cursors in
the session level.
clean up explicit declaration of 'ret'
Implement WT_CURSOR.search_near, fix bugs in WT_CURSOR.{next,prev}, any KVS
call returning a key must be approached with a key pointing to the key buffer,
otherwise we might try and overwrite random data (that isn't large enough to
be overwritten).

General clean-up of function calls and parameter passing, trust the compiler
to get the inline optimizations correct.
Fix a printf.
update