LSM optimizations

1. improve merge algorithm, particularly when there are multiple merge threads;
2. get incrementally more aggressive about merging, rather than all or nothing;
3. avoid the checkpoint lock in common LSM paths.