Fix error handling in LSM cursor open.
LSM manager threads. Fixup reference counting in queues.