Workaround racy behavior of [FIRAnalytics resetAnalyticsData].
Workaround racy behavior of [FIRAnalytics resetAnalyticsData].

When calling [FIRAnalytics resetAnalyticsData] too quickly after initializing
the iOS library the method fails to do anything.  In addition, it is not
possible to retrieve the new app instance ID after analytics data has been
reset without polling on iOS which is unfortunate since the C++ SDK exposes
an asynchronous interface to retrieve the ID.

This implements a workaround using AnalyticsDataResetter which tracks the
requested reset state of analytics data which is then used by a thread spawned
by GetAnalyticsInstanceId() to determine when the data is reset by polling
the app instance ID.

PiperOrigin-RevId: 277738391

firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk