[llvm][support] Refactor symlink handling and add readlink (#184256)

This adds a portable `readlink` function, and adds `create_symlink` to
enable testing this on Windows. `create_link` previously created a hard
link on Windows, but it now tries to create a symlink first.

The Windows implementation is based on posix_compat.h from libc++.

Assisted-by: claude-opus-4.6
GitOrigin-RevId: a17b132a42c93e20fe07c410cb06bd56930b82bf
5 files changed