Lsm checkpoint lock

Ensure that LSM is holding the checkpoint lock before doing things that can interfere with (or be interfered upon) checkpoint operations.

References #664