inject: Use a semaphore to prevent multiple runs of inject to interfere with each other.

Most users would never hit this, but it enables me to run apitrace tests
in parallel reliably.