Merge pull request #2760 from zwarich/compositor-100-columns

Fix 100-column violations in compositor.rs
Add a ShutdownState type in the compositor

Currently the compositor tracks its state in the processing of shutting
down with two boolean instance variables `shutting_down` and `done`, but
these two variables really implement a three-state abstraction.