Don't bother checking for an empty page: it indicates file corruption,
and there's no reason to corruption would touch the page's entry count
any more than any other range of bytes on the page.
This should be an assert, not a run-time check, it's a coding error
if it ever fires.
Rework some of the asserts based on how likely/useful they are.
Separate out the diagnostic code, it's cleaner this way.
Avoid an "unused variable" complaint when building in non-HAVE_DIAGNOSTIC mode.
fix unused variable warnings.
Some functions with WT_ASSERT calls don't use the session handle for any
other purpose, keep the compiler quiet in those cases.