Migrate COMP to PO on corp owned device on boot.

When the syste boots, check if the device is in COMP mode and if it is:
  * Mark PO as PO on corp owned device.
  * Migrate policies from from DO admin to PO parent instance:
    * password, timeout, keyguard related policies
    * camera, screenshot
    * accounts types with management disabled
    * support messages
    * applicable user restrictions
  * Clears DO and disables it as device admin.

Two new unit tests verify that the decision whether to migrate or not is made
correctly and that after the migrateion DO ceases to be device admin.

Test: atest com.android.server.devicepolicy.DevicePolicyManagerServiceMigrationTest
Bug: 143516163
Change-Id: I9131fb35da0f78066a662eed9c00207a5a923352
11 files changed