Fix a problem with the cache's dirty-byte calculation; a page can be
marked clean or dirty while the page's footprint is being updated (for
example, the WT_UPDATE "obsolete" discard function can obviously be
updating the page's footprint when the page is clean or dirty).

Handle this by saving a copy of the last value used to increment/decrement
the cache's dirty-byte count for this page, and when the page transitions,
use that saved value to reverse the increment/decrement, not the page's
current footprint.

This means the cache's dirty-byte information lags reality because each
change to the page's footprint won't be reflected in the cache until the
page transitions.  To keep that from being too much of a problem, update
the page's cache dirty-btye information as part of reconciliation, even
if the page isn't transitioning from dirty to clean.

If updating during reconciliation is insufficient, we could also do a
similar information update anywhere we know that only a single thread
of control can being doing the update.  For example, when a
serialization function calls __wt_page_modify_set(), we could check and
if the saved footprint value is sufficiently different from the current
footprint value, we could do the same information update there, since
only a single thread can be doing a serialized update on a page at any
time.
Merge branch 'develop' into cache-dirty-bytes
Merge branch 'develop' into cache-dirty-bytes
Merge branch 'develop' into cache-dirty-bytes
Update a couple of comments for clarity.
spelling.
Merge branch 'develop' into cache-dirty-bytes
Merge branch 'develop' into cache-dirty-bytes
Remove prototypes for __wt_cksum_hw/__wt_cksum_sw, they aren't needed
and they make lint unhappy when __wt_cksum_hw isn't referenced at all
(on non-x86_64 machines).
Cleanup the transaction state after a checkpoint.

refs #701
Fix a bug scanning through a memory-mapped file with overflow items (which is what LSM merges are doing all the time).

refs #701
Comment: explain why we copy the prefix before growing the buffer.
Merge pull request #704 from wiredtiger/mutex-cleanup

Mutex cleanup
Merge branch 'develop' into cache-dirty-bytes
shorter the output line so larger runs fit into 80 characters.
Shorten the time we hold the serialization lock, move the increment of the
cache/page information and the call to mark the page dirty outside of the
serialization lock.
Track the per-page contribution to the cache's dirty byte count.  If this is non-zero when a page is being discarded, fix the cache's count.

refs #635, #699
Merge pull request #708 from wiredtiger/cache-dirty-bytes2

Track the per-page contribution to the cache's dirty byte count.
Merge branch 'develop' into cache-dirty-bytes
Cleanup after merge: remove some duplicate code / comments.