Changes to minimize the impact of checkpoints on other threads

These changes:

* move fsync out of the checkpoint transaction,
* avoid attempts to write pages that have already been written in the checkpoint, and
* discourage use of direct I/O by hinting to the OS to drop buffers from cache instead.