add(disk_util): Rename cgpt.py to disk_util.

Use a more generic name so cgpt.py and disk_layout_util.sh can be merged
into one tool. Wrappers around wrappers around wrappers are tedious.
fix(disk_util): Rework how argument parsing/passing works.

Move from optparse to argparse. Move layout file and layout type to
global options with reasonable default values so every command doesn't
need to them. Adjust calling scripts to match.

For now layout type is being passed via an environment variable
DISK_LAYOUT_TYPE but this is a temporary situation.
fix(disk_util): Merge write_mbr into write_gpt

No need for this to be a different command.
fix(disk_util): Remove support for --adjust_part

This isn't a feature we've been using as far as I know and if someone
needs a custom partition layout it's probably better to just add it to
the json file. Removing this avoids some complexity.
fix(disk_util): Convert partition list to an object.

Hey, 'num' is a primary key! Lets use it and avoid pointless looping.
fix(disk_util): Rework config parsing.

Merge GetPartitionTable and partition alignment from WritePartitionTable
into LoadPartitionConfig so that all this config manipulation code is in
one place and inheritance from the 'base' layout is more predictable.
feat(disk_util): Add 'format' command to create filesystems in an image.

This will replace the less flexible code in base_image_util.sh
feat(disk_util): Add mount and unmount commands.

This will replace the assorted mix of mount/umount scripts.
fix(base_image_util): Remove dead code, leave rootfs writable.

The verification flag was being passed through to the bootloader
template script but no longer had any effect.
Force the base image to always remain writable, its only purpose is to
be modified in a later build step anyway.
fix(build_image): Migrate to new disk_util commands
fix(cros_make_image_bootable): Remove dead command line flags.

Lots of things are either unused or meaningless. A particularly creative
one is the fact that there are command line flags for mount point
locations that are then overwritten.
fix(disk_util): Install syslinux as part of filesystem formatting.

This means scripts later don't need to deal with the ESP block device
directly, they can just copy the config files into place.
fix(create_legacy_bootloader_templates): Setup ESP partition.

Replace "update_bootloaders" script.
fix(cros_make_image_bootable): Switch to disk_util mount/umount
add(prod_image_util): Rename what remains of cros_make_image_bootable

cros_make_image_bootable now only is relevant for prod images, so move
the remaining code to prod_image_util in a similar scheme that base and
dev images use.
fix(image_to_vm): Remove support for alternate state fs image.

We haven't really needed this, remove the option to simplify things.
fix(disk_util): Move existing image reading code to new function.

This will allow the code to be shared, making it possible to safely
resize existing images with disk_util.
fix(disk_util): Add option to safely rewrite partition table.

write_gpt --update <img> will read an existing image and make sure all
existing partitions will not get moved or truncated in the new layout.
This is mostly useful for resizing the final partition or just rewriting
metadata like partition types and labels.
fix(disk_util): Move loop device setup code to generic function
feat(disk_util): Add resize command.

Based on the new gpt update code add the ability to resize filesystems
in existing images. Usually just the last (STATE) partition is resized.