Move build logic to cmd/build.go

Image building is not specific to QEMU although it's currently the only
supported hypervisor for building images.

Move the code to cmd/build.go in preparation for making the code more
generic.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>