paycheck: unit tests + fixes to checker module

This adds missing unit tests for the checker module, bundled with fixes
to some bugs that surfaced due to unit tests. This includes:

* A fake extent (signified by start_block == UINT64_MAX) that
  accompanies a signature data blob bears different requirements than
  previously implemented.  Specifically, the extent sequence must have
  exactly one extent; and the number of blocks is not necessarily one,
  rather it is the correct number that corresponds to the actual length
  of the signature blob.

* REPLACE/REPLACE_BZ operations must contain data.

* MOVE operation validation must ensure that all of the actual message
  extents are being used.

* BSDIFF operation must contain data (the diff).

* Signature pseudo-operation should be a REPLACE.

BUG=chromium-os:34911,chromium-os:33607,chromium-os:7597
TEST=Passes unittests (upcoming); works with actual payloads.

Change-Id: I4d839d1d4da1fbb4a493b208958a139368e2c8ca
Reviewed-on: https://gerrit.chromium.org/gerrit/45429
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
7 files changed