sf: Add basic implementation of onVsyncIdle

To adopt the new AIDL composer callback API, the patch changes the
architecture to pass HWC2::ComposerCallback directly in the
registerCallback function. The underlying implementations can use their
own bridge to adapt with different versions of callback APIs.

Bug: 194068871
Test: atest libsurfaceflinger_unittest
Change-Id: I08bcf481747f38805fb2527e18293585ede51554
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 9e57602..f1f06d7 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -105,7 +105,7 @@
 
     virtual ~HWComposer();
 
-    virtual void setCallback(HWC2::ComposerCallback*) = 0;
+    virtual void setCallback(HWC2::ComposerCallback&) = 0;
 
     virtual bool getDisplayIdentificationData(hal::HWDisplayId, uint8_t* outPort,
                                               DisplayIdentificationData* outData) const = 0;
@@ -272,7 +272,7 @@
 
     ~HWComposer() override;
 
-    void setCallback(HWC2::ComposerCallback*) override;
+    void setCallback(HWC2::ComposerCallback&) override;
 
     bool getDisplayIdentificationData(hal::HWDisplayId, uint8_t* outPort,
                                       DisplayIdentificationData* outData) const override;