Allow disabling and re-enabling GSI.

This change introduces two new commands to gsi_tool: enable and disable.
Disable is similar to "wipe", in that it allows reboot back into the
normal system image. However unlike "wipe" the GSI images will not be
deleted on startup.

The GSI install can then be re-enabled with the "enable" command.
Unfortunately, this currently has a high probability of hitting a bug in
F2FS where the file cannot be repinned. This can happen if the device
has been used or rebooted extensively in between disabling and
re-enabling the GSI.

In addition, the semantics of the "install" command have changed. It
will now attempt to re-use an existing userdata if one exists. To force
a clean userdata, the --wipe parameter can be specified.

To disable a GSI install:
   gsi_tool disable
   adb reboot

To re-enable a GSI install:
   gsi_tool enable
   adb reboot

To install a GSI and preserve userdata:
   gsi_tool install --gsi-size=SIZE < image

To install a GSI and create a userdata if none exists:
   gsi_tool install --gsi-size=SIZE --userdata-size=SIZE < image

To install a GSI and wipe userdata:
   gsi_tool install --gsi-size=SIZE --userdata-size=SIZE --wipe < image

Bug: 122556707
Test: manual test
Change-Id: Ia55ca930b0b7f6b2b97a6390568555b4166e2605
8 files changed