[XRay] [compiler-rt] make sure single threaded programs get traced too
When the XRay user calls the API to finish writing the log, the thread
which is calling the API still hasn't finished and therefore won't get
its trace written. Add a test for only the main thread to check this.
Differential Revision: https://reviews.llvm.org/D38493