Reduce number of Fence syscalls made.

This patch saves 6 or more Fence syscalls per frame.

* Timelines are updated just before adding a new fence
  since the newly added fence is unlikely to have signaled.
* Layer::latch uses a FenceTime now, so the signal time is
  automatically shared with other owners of the FenceTime.
* DispSync uses FenceTime now, only using cached values of
  the signal time that have been populated by a Timeline.

Test: SurfaceFlinger boots and dumps still work.
Change-Id: Ie0cfc1af2aca143dd8d5f08f08dbe1e597376f2f
5 files changed