Waiting for FakeLatencyTracker’s listener to be registered

Because listener inside LatencyTracker `startListeningForLatencyTrackerConfigChanges` is registered using `BackgroundThread.getHandler()` there’s no guarantee that it will be registered before test starts running and asserting stuff. 
This change allows passing Executor so we can control where adding callback - and callback itself - is executed.

Test: atest FrameworksCoreTests_jank:com.android.internal.util.LatencyTrackerTest --rerun-until-failure 100 - it also requires forcing Settings to not use cache for all tests to pass
Flag: EXEMPT bugfix
Bug: 412954344
Change-Id: Ia87486b30451baa0c1c9a78aaa489e242f906e2d
2 files changed