Ensure that there are switch work units for LSM trees that need them.

Two cases where switches may be needed are:
    * Failed switches that still have NEED_SWITCH set
    * If a thread is blocked waiting for a switch.

References #1305
Tweak the LSM cursor enter loop slightly.

It makes more sense to me if we push the work unit to trigger the switch then wait...
Fix the switch logic so we set WT_LSM_TREE_NEED_SWITCH when there is no primary.
Merge pull request #1308 from wiredtiger/lsm-switch-compact

Ensure that there are switch work units for LSM trees that need them.