Only run LSM switches if they are needed.

Refs #1186
Fix build warnings.
Move LSM manager initialization into main thread.
Merge pull request #1197 from wiredtiger/lsm-manager-init

Move LSM manager initialization into main thread.