Lsm shared workers

Move to a model where there is a single set of worker threads for all LSM trees, rather than each tree having a set of worker threads.

This branch isn't ready for review yet, just opening a pull request so I can easily review the changes at the moment.

References #1113