lava-submit.jpl: Add generic retries with backoff

Don't retry twice with adhoc code. Retry using a normal for loop, so number
of retries can be easily adjusted. Use 5 retries for now. Also add backoff
(multiplicative though).

Triggered by seeing a 4+ hour nightly build which failed only because two
back-to-back retries failed.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ie9618e9c679479279c672acb32b54f3a69f44f9e
1 file changed