EXO: Move LayerTreeFrameSinkHolder lifetime hook into exo interface

LayerTreeFrameSinkHolder needs to outlive its SurfaceTreeHost parent
when buffers are still in flight and haven't been released. To work
around this issue EXO currently relies on an ash::Shell lifetime
observer to determine when to release the resources during shutdown. In
order to remove the Ash dependency create a LifetimeManager object owned
by WMHelper and have LayerTreeFrameSinkHolder use that to cleanup during
shutdown.

This should be equivalent on ChromeOS as EXO is destroyed as part of the
same shutdown procedure as ash::Shell and EXO needs to be destroyed just
before ash::Shell as EXO has dependencies on ash::Shell.

Bug: 896710
Test: Run exo_unittests
Change-Id: I9518bc2ec8e5e5955e26f52e4ce61b9870085c8d
Reviewed-on: https://chromium-review.googlesource.com/c/1327408
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613696}
9 files changed