Michael's work in progress

This pull request is not intended for merging in the short term.

Instead, it contains some changes that are intended to clean up and improve caching of sessions and cursors.  There are also two changes to the MongoDB server to fix bugs that are unrelated to WiredTiger.

Note that not all tests pass with these changes apply: caveat emptor.