bisect-kit: mitigate "repo sync" hang problem

1. Set repo sync timeout limit. When it happens, it will re-init the
   repository and sync again.
2. kill previous left "repo_launcher" subprocesses, which may hang new
   "repo sync" command.
3. The output of "repo sync" may return non-UTF8 chars. Turn the popen
   call into binary mode to avoid decode() error.
4. Handle util.Popen reader thread exceptions gracefully.

BUG=b:332200004
TEST=setup_cros_bisect.py sync && run_formatters.sh && run_tests.sh

Change-Id: I331354f708aff8879f2b2df0e65b075fd9459566
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/bisect-kit/+/5400875
Reviewed-by: MD Nayeem Jahan Rafi <njrafi@chromium.org>
Commit-Queue: Cheng-Yu Lee <cylee@google.com>
Tested-by: Cheng-Yu Lee <cylee@google.com>
2 files changed