Refactor of cgpt tool for 32->64 autoupdate work.

This check-in splits the cgpt into two layers. The top layer (cmd_* files) does
the command-line parsing and the bottom layer (cgpt_* files) does the actual
cgpt work.

This is done so that the bottom layer can be reused for the monolithic
C++ post-installer code that will be done in subsequent checkins.

TEST=Tested with existing cgpt unit tests as well as running the cgpt commands manually.

Change-Id: I69a31eb3e867a1430cac9a694581331368aa7bb4
Reviewed-by: Jay Srinivasan <>
Tested-by: Jay Srinivasan <>
Commit-Ready: Jay Srinivasan <>
16 files changed