SurfaceFlinger: Trace pending BufferStateLayer buffers.

In BufferQueueLayer the BufferQueueConsumer lives inside the server
process, and ATRACE's an integer indicating the current number of
queued buffers. This makes it possible from systrace to observe
three useful points:
	1. When a buffer arrives at the server
	2. When the buffer is latched
	3. If any buffers are dropped
In BLAST this trace point has of course been moved to the client
process. In this CL we introduce some new machinery to ATRACE and
increment an integer when transactions containing a buffer arrive
at the server. We then decrement this integer when dropping a frame or
latching a buffer.

Bug: 171232941
Test: Existing tests pass
Change-Id: I2672018e4f20d683e3249141438d0716b5af9d11
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 0509247..96d0499 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -743,7 +743,8 @@
     void commitTransaction() REQUIRES(mStateLock);
     void commitOffscreenLayers();
     bool transactionIsReadyToBeApplied(int64_t desiredPresentTime,
-                                       const Vector<ComposerState>& states);
+                                       const Vector<ComposerState>& states,
+                                       bool updateTransactionCounters = false) REQUIRES(mStateLock);
     uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock);
     uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands)
             REQUIRES(mStateLock);