[AChoreographer] Move refresh rate callback headers into android
This is in parallel with exposing these apis into NDK from libandroid.
Also performing some cleanup:
* Add additional documentation.
* Pass an extra data pointer when unregistering a callback, so that
callbacks are keyed by callback function + data pointer. This way the
same callback method can be passed with different data pointers.
* Enforce in the implementation that the same callback + data pointer
can't be registered twice.
* Update cached vsync period once all callbacks have been fired for a
refresh rate change, not just when the first one fired.
Bug: 136262896
Test: ChorographerNativeTest
Change-Id: I9d1224bf05dcaf820166996b58a10b6e73d6adcd
3 files changed