[w32handle] Fix race condition when creating named mutex/event/semaphore (#3560)