Fix several bugs in LSM:

* the logic for setting the "no eviction" flag on LSM chunks was reversed, causing unnecessary eviction once the cache became full;
* calling session.checkpoint while writing to an LSM tree could confuse the logic around switching to new chunks; and
* fix a possible NULL pointer indirection when switching chunks.