Check that handles are not being walked by eviction before discarding.

refs #1497
Insulate against language-specific sort order in s_win.
Remove the SET/CLEAR_BTREE_IN_SESSION macros: now we have WT_WITH_DHANDLE, they don't make much sense.