build-unit-test-docker: prevent exception in thread start-up

Add a lock to allow all the threads to start before they start
running, so that one thread doesn't 'join' on its dependency
before the dependency starts.  This shows as an exception:

    Traceback (most recent call last):
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "./scripts/build-unit-test-docker", line 353, in run
        deppkg.join()
      File "/usr/lib/python3.8/threading.py", line 1006, in join
        raise RuntimeError("cannot join thread before it is started")

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7594ac393f310085eb8328a0394493c01b78add3
1 file changed