trousers: Retry I/O errors when communicating with the TPM.

Writes/reads will be retried up a number of times specified by the
TCSD_TPM_RW_RETRY_COUNT environment variable, or a default of 3
times if this is not set.

BUG=chromium:830130
TEST=ran live test locally with modified kernel that fails 50% of reads/writes, checks test passes and messages printed

Change-Id: I5a0d4d45bfa2ee415ac0c807883c679b5fdbf5b1
Reviewed-on: https://chromium-review.googlesource.com/1051489
Commit-Ready: Louis Collard <louiscollard@chromium.org>
Tested-by: Louis Collard <louiscollard@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
1 file changed