dev: add cros_archive.sh library to search archived images

Fetching images by version requires the ability to search in the
gs:// archives. Reading LATEST directly will be faster, but does
not help when bisecting problems.

This library supports parsing and formatting of CrOS versions and
several functions specific to the current organization of
gs://chromeos-image-archive and gs://chromeos-releases. It is
used by the cros_fetch_image script that I hope to get uploaded
shortly.

BUG=chromium-os:27665
TEST=unittests and gsutil cp the generated URLs.

Change-Id: I532591b17ce75c182bef9bf9c6fb6711bb812bb9
Reviewed-on: https://gerrit.chromium.org/gerrit/21517
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
2 files changed