validate path lengths before writes and attempt to eagerly convert win paths (#69141)
### What?
Check and attempt to resolve potential file length issues on all platforms.
### Why?
Each OS / fs has particular constraints on file name- and path lengths. On unix they are hard(ish) limits. On windows, there is a workaround.
We have a hit a case where we are producing files that exceed these limits.
### How?
On windows, attempt to canonicalize. On macOS / linux, check these limits (using macOS as the common denominator) and provide meaningful errors.
Note: I have opted to explicitly enforce reasonable limits here rather than relying on the undefined limits of the host operating system. This means we may hit cases where we are overly restrictive, however this sets the scene for the next PR that ensures, given these limits, that we never end up producing paths in turbopack that would exceed our own restrictions, namely making sure that written assets never exceed 255 bytes.