Refactor gsid to separate the installer code.

GsiService is getting to be pretty unreadable, in part because it's a
lot of code, but also because it mixes a lot of state in with the rest
of GsiService. It's not always clear when it's okay for GsiService to
rely on state set by the install process.

To make this much more clear, this patch separates all the installer
code into a separate GsiInstaller class, which has its own header and
source files. GsiService will instantiate a GsiInstaller as needed and
destroy it to either cancel or complete an install. As an added bonus,
install cleanup can now be handled in the GsiInstaller destructor,
rather than on an ad-hoc basis in GsiService.

Bug: N/A
Test: gsi_tool install
      gsi_tool disable
      gsi_tool enable
      gsi_tool wipe
      gsi_tool cancel
Change-Id: I26b2a48487a1df903d1805de80b0c6f2a074f997
6 files changed