Add MobileFrontend.Context service
This service allows us to break apart classes that rely heavily on
MobileContext::singleton, i.e. MobileFrontendHooks, and also to extract
real services from MobileContext while maintaining compatibility with
existing clients, e.g. DeviceFormFactorDetector (see T143891).
To be clear, this service should be considered temporary.
- Because MobileContext::singleton is used everywhere, there were calls to MobileContext::setInstance in several test cases which were meant to reset the object's state. Create the ::resetServiceForTesting method which service this use case.
- Make MobileContext::singleton return the MobileFrontend.Context service, if the singleton instance hasn't been set
- Make MobileContext accept instance of Config at construction, which can then be returned MobileContext#getMFConfig
- Update test suites to use MobileContext::resetServiceForTesting
- Deprecate MobileContext::singleton, ::setInstanceForTesting, and ::resetServiceForTesting as they are superseded by the service