relpaths: Fix repeated usages of RelPath::unix on static paths (#39675)

- **paths: Cache away results of static construction of RelPath**
- **agent: Cache away results of converting rules file names into
relpaths**

This PR fixed a regression from relpath PR where we've started doing
more work when working with static (Rel-)Paths.

Release Notes:

- N/A
3bec885536Piotr Osiewicz committed on 10/7/2025, 12:23:31 PM· committed by GitHubparent9a5034e
2 files changedLine totals unavailable