Add a new per-session flag, WT_SESSION_CAN_WAIT

@michaelcahill, here's the change we discussed, plus a couple of semi-related odds-and-ends (all on separate commits, so you can cherry-pick or revert easily if you want).

Reference #1152.
Almost -- during the write leaves phase, but while it isn't holding the schema lock.

Here's what should happen:

- checkpoint is called by the application
- set the can-wait session flag
- take the checkpoint lock (which does nothing other than serialize checkpoints now)
- write the leaf pages: if the block manager wants to flush based on `os_cache_dirty`, can-wait is set so the thread does the flush
- take the schema lock
- write the checkpoint pages: if the block manager wants to flush based on `os_cache_dirty`, we hold the schema lock which overrides can-wait, so the thread won't do the flush