[BREAKING CHANGE] Window process cleanup

Emit events and set CSS classes after processes are complete (setup,
ready, teardown) instead of during and after methods are called
(opening, open, closing, closed) to make it clearer what the events and
classes have to do with code in the overridden methods in the window
classes that extend them.

Change-Id: Id7d6475a14b1f35fe02105e632d8bb441ef4b3de
Merge "[BREAKING CHANGE] Window process cleanup"