[queuedwork] Add test

Bug: 263820216

Tested: presubmit,
and also staged revert of ag/26123161 on top of this change
and verified expected failure of testWaitToFinishDoesNotCreateThread:
https://android-build.corp.google.com/test_investigate/?blocking=blocking&invocationId=I96000010243419492

Change-Id: I2072f7135f23755cdf45ddd979065e169345ce17
2 files changed