Resolve symlinks then climb up to the nearest ancestor containing
ProjectSettings/ProjectVersion.txt. Falls back to the resolved input
if no Unity root is found.
Per-user cache root for tarball-extracted Unity packages. Subdirectory by
Unity version isolates installs (each ships its own bundled tarballs).
Honours XDG_CACHE_HOME; falls back to $HOME/.cache. Panics if neither
is set — landing extracted Unity code in a world-writable /tmp would let
anyone tamper with our compile inputs.