cros_generate_update_payload: Don't do sudo when calling cgpt.

cros_generate_update_payload was using partoffset and partsize from
chromeos-common.sh which call sudo before running cgpt to detect the
offset and size of a partition. This is ok in the context of
chromeos-common.sh, since they are often called over a block device,
but in cros_generate_update_payload the images are regular files.

This patch stops including chromeos-common.sh and uses its own simpler
version of these functions that don't call sudo.

BUG=None
TEST=Ran cros_generate_update_payload as a regular user.

Change-Id: I57d16460ee411e0f7670d7e16d611718c83be2df
Reviewed-on: https://chromium-review.googlesource.com/284703
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
1 file changed