When multiple threads call OpenXR functions, make sure one thread
can not read the reply meant for another thread.
Unfortunately this also blocks other OpenXR functions from being
called while xrWaitFrame() is blocking.
The service considers clients to be connected as long as the fd is not closed.
After destroying an XrInstance this prevents the client from creating a subsequent XrInstance.