SurfaceFlinger: expose vsync id extra buffers

Expose a function for clients to call and query the number
of extra buffers needed when vsync id is passed with the buffer.

Test: launch an app and observe systrace
Test: SF unit tests
Bug: 178148035
Change-Id: Icbeec66073feeae9768f0dcc45831b26144ab6f6
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index 3f7a5b1..bbf0906 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -889,6 +889,8 @@
 
     int getGPUContextPriority() override { return 0; };
 
+    status_t getExtraBufferCount(int* /*extraBuffers*/) const override { return NO_ERROR; }
+
 protected:
     IBinder* onAsBinder() override { return nullptr; }