Fix races in CanAccessDirectory
Fix races in CanAccessDirectory

If several bazel processes are starting concurrently some of them can fail to start with error
```Output base directory ... must be readable and writable.```

It happens because CanAccessDirectory doesn't handle `NTSTATUS` `STATUS_DELETE_PENDING` for file.
`STATUS_DELETE_PENDING` occured if `DeleteFile` finished successfully but there are open handles for the file.
`STATUS_DELETE_PENDING` is converted to `ERROR_ACCESS_DENIED` on Win32 level so client code can't distinguish pending deletion from real denied access.

To workaround this problem we can create check-file with unique name, for example with current thread id.

P.S.
This problem is reproducible on Windows versions prior to Windows 10 19H1.

Closes #10649.

PiperOrigin-RevId: 292529503

bazelbuild/bazel,safarmer/bazel,werkt/bazel,ulfjack/bazel,katre/bazel,akira-baruah/bazel,akira-baruah/bazel,twitter-forks/bazel,dslomov/bazel-windows,bazelbuild/bazel,meteorcloudy/bazel,dslomov/bazel-windows,meteorcloudy/bazel,dslomov/bazel-windows,cushon/bazel,cushon/bazel,dslomov/bazel-windows,ulfjack/bazel,ButterflyNetwork/bazel,dslomov/bazel,twitter-forks/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,perezd/bazel,twitter-forks/bazel,ButterflyNetwork/bazel,dslomov/bazel-windows,ulfjack/bazel,katre/bazel,bazelbuild/bazel,akira-baruah/bazel,davidzchen/bazel,safarmer/bazel,katre/bazel,cushon/bazel,dslomov/bazel,meteorcloudy/bazel,katre/bazel,werkt/bazel,ButterflyNetwork/bazel,davidzchen/bazel,katre/bazel,davidzchen/bazel,bazelbuild/bazel,cushon/bazel,akira-baruah/bazel,meteorcloudy/bazel,cushon/bazel,safarmer/bazel,ButterflyNetwork/bazel,akira-baruah/bazel,perezd/bazel,twitter-forks/bazel,ulfjack/bazel,werkt/bazel,cushon/bazel,akira-baruah/bazel,meteorcloudy/bazel,perezd/bazel,ulfjack/bazel,ulfjack/bazel,safarmer/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,werkt/bazel,meteorcloudy/bazel,dslomov/bazel,dslomov/bazel-windows,dslomov/bazel,twitter-forks/bazel,perezd/bazel,perezd/bazel,katre/bazel,dslomov/bazel,safarmer/bazel,twitter-forks/bazel,perezd/bazel,davidzchen/bazel,davidzchen/bazel,davidzchen/bazel,ulfjack/bazel,perezd/bazel,safarmer/bazel,davidzchen/bazel,dslomov/bazel,twitter-forks/bazel,dslomov/bazel,werkt/bazel,werkt/bazel,meteorcloudy/bazel