cr50: fix cryptography problems
cr50: fix cryptography problems

A couple of issues were uncovered when testing hash implementation
more extensively (with multiple overlapping streams of data). This
patch fixes the problems.

BRANCH=none
BUG=chrome-os-partner:43025
TEST=the previously failing hash tests got not fail any more:
  $ ./test/tpm_test/tpmtest.py
  Starting MPSSE at 800 kHz
  Connected to device vid:did:rid of 1ae0:0028:00
  [...]
  SUCCESS: sha1:single 0
  SUCCESS: sha256:single 0
  SUCCESS: sha256:finish 1
  SUCCESS: sha1:finish 3
  SUCCESS: sha256:finish 2

Change-Id: I7ee857eec2dac2d9312df7db3b27e5a69ac55ad9
Signed-off-by: Vadim Bendebury <5515d6d2d0829cbe0dd0dcf2094aaded06d58514@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/314694
Reviewed-by: Nagendra Modadugu <5dc366ddbf8fb5981f46478e8436ef712a08b71b@google.com>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec