Writing enrollments to the SQL database is an async process, so the
entire unenroll flow needs to become async. This patch lays the
groundwork for making that happen by updating our testing helpers to use
async functions, as well as adding some new helpers for asserting the
state of the enrollments database.
For now the unenroll() (_unenroll()) functions are marked async but
otherwise have no behavioural changes -- this is just a first step to
port all the tests over before landing changes that write to the
enrollments store (which have to all be landed together).
Most callers of unenroll() have been updated so that they await the
result. There are a few callers left that do not await the result,
however, mostly because doing so causes race conditions in tests (most
notably in the pref observers in ExperimentManager and the
PrefFlipsFeature). These issues will be addressed in bug 1956082.
Differential Revision: https://phabricator.services.mozilla.com/D250504