Introducing FactoryResetter, a single entry point for factory reset calls.

The new class has options to wipe external storage and factory reset
proctection, so it can be a single entry point from both
DPM.wipeData() and the ManagedProvisioning app, which in turn will make
it easier to postpone these operations on automotive when the
vehicle is moving.

Test: atest FrameworksServicesTests:DevicePolicyManagerTest \
            FrameworksMockingServicesTests:FactoryResetterTest

Test: adb shell dumpsys activity service --user 0 com.afwsamples.testdpc wipe-data 7

Bug: 171603586
Bug: 175392542
Fixes: 172697975

Change-Id: I37d5f8c59645459e48620047261ffd06d90ac2be
9 files changed