LSM checkpoint fixes

Fix a number of issues found while testing LSM with frequent application checkpoints.