More LSM optimizations:

* don't block on the checkpoint lock indefinitely if application threads are waiting for a switch;
* smooth out the effect of fsync with a non-zero default value of os_cache_dirty_max for LSM;
* have merge threads check whether they can help with switching before they sleep;
* tweak the merge algorithm again so we do consider bigger merges.