LSM manager threads.

* Add a few statistics to track manager queues.
* Fix an issue with not freeing work units.
* Shut down the right number of threads.