pushimage: allow for multiple keysets/image inputs

If we want to sign multiple images with multiple keysets, but the same
artifact type, today we can't because we assume a branch produces just
one of each (a single recovery or factory image, but multiple keysets).

With some firmware branches (like samus) though, we include multiple
firmware images that are the same type, but for different pieces of
hardware, which means different keysets.  This is a bit outside of the
original design/assumption of pushimage/branches, but we can do it!

Now the input insns format will check & merge overlays.  So a file that
looks something like:
  [insns]
  channel = dev
  [insns.one]
  keyset = Zinger
  input_files = zinger/ec.bin
  [insns.two]
  keyset = Hoho
  input_files = hoho/ec.bin

Will post two insn files:
  [insns]
  channel = dev
  keyset = Zinger
  input_files = zinger/ec.bin
And:
  [insns]
  channel = dev
  keyset = Hoho
  input_files = hoho/ec.bin

The keyset part doesn't seem terribly interesting (since we already allow
people to specify multiple keysets in [insns]), but makes more sense when
you tweak the other fields like channel, input_files, and output_names.

BUG=chrome-os-partner:47557
TEST=unittests pass

Change-Id: I4e8f6a88422c73e2b5b3c1042bf240afc3b80d83
Reviewed-on: https://chromium-review.googlesource.com/312300
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
4 files changed