filesystem: add `trylockfile` and `unlockfile` (#63613)
Take or release an advisory lock on a `Filesystem.File` without waiting:
shared locks coexist and an exclusive one excludes all others. The operating
system drops the lock when the file is closed or the process exits, so it
cannot go stale. This uses `flock` on Unix and `LockFileEx` on Windows, where
the lock covers one byte far beyond any file data so that it stays advisory
and does not block reads. A `File` is opened through libuv, which on Windows
lets other processes rename or delete the file while it is open.
Assisted-by: Claude Code (Opus 5.5)
Assisted-by: Codex (gpt-6.1-sol)
Assisted-by: Claude Code (Fable 5.1)