Add docker builds for x86 crosvm binaries

Cleaning up:
-- renamed --x86_instance, --x86_user --> --gce_instance, --gce_user;
-- renamed --arm_system to --arm_instance for consistency with
   option -- gce_instance;
-- added top-level --gce, --arm, --docker toggles, all false by default;
   these now need to be specified to trigger the respective type of
   build, e.g:

	./device/google/cuttlefish_vmm/rebuild.sh --gce
	./device/google/cuttlefish_vmm/rebuild.sh --arm \
		--arm_instance 192.168.0.6 --arm_user cf

-- fixed typo: rebuild-internal.sh, not rebuild_internal.sh;
-- put in checks to ensure --arm_system and --arm_user aren't empty when
   option --arm is specified;
-- invoke rebuild-internal.sh with install_packages separately from
   rebuild-internal.sh to actually build crosvm, since
   rebuild-internal.sh no longer directly invokes install_packages;
-- Rename option --custom_manifest to --manifest; make --manifest take
   the default value of ./devices/google/cuttlefish_vmm/$(uname
   -m)-linux-gnu/manifest.xml;
-- Always pass the manifest flag to the build script.  The implication
   is that you no longer have to specify the manifest.  Previously,
   failing to specify explicitly a manifest file meant that the entire
   Android tree would be synced, which was an enormous waste of time.

Added support for x86 docker images:
-- New option --docker that enables a docker build;
-- New options --docker_source, --docker_working, and --docker_output to
   specify external paths to contain respectively the sources, working
   directory, and output directory for the finished binary artifacts;
-- Option --docker_output defaults to
   ./device/google/cuttlefish_vmm/$(uname -m)-linux-gnu, meaning the
   docker build will put the built images in the right place;
-- If options --docker_source and --docker_working are left unspecified,
   the container will pull the sources internally and stash its
   intermediate object files internally as well;
-- Options --reuse and --reuse_resync work with the docker build;
-- The .dockerignore file is meant to prevent the entire directory from
   being copied to the docker deamon as context, except for the three
   files (rebuild-internal.sh, and *-linux-gnu/manifest.xml) that we
   care about.

Test: built crosvm for gce, arm, and docker
Bug: 148642775 Clean up the crosvm build

Change-Id: I861c5ee8f1d7c7e1b1048380af6b49ea7834ca88
Signed-off-by: Iliyan Malchev <malchev@google.com>
3 files changed