Parse Payload v2 header.

The update payload v2 contains an extra field in the header with the
size of the metadata signatures and the metadata signatures stored
right after the metadata. This patch parses the new payload format.

BUG=b:22024447
TEST=cros payload show payload-v2.bin; served a payload v2 with devserver.py

Change-Id: I8ce85af1df505f82f62a9d1cd57910cee6921f84
Reviewed-on: https://chromium-review.googlesource.com/306090
Commit-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
3 files changed