Make 1917 less flaky

We were racing the target thread slightly which meant that the output
could change as the target thread is in an unexpected position when we
dump it's stack. This makes sure we wait until the target thread
actually goes to sleep before dumping its stack.

Bug: 64134910
Test: ./test.py --host -j50
Change-Id: Ifaf9686e3fa9a1991858f9f0119e589e83169640
2 files changed