feat: add polyfill of `URL.canParse` for browser compatibility (#70228)
### Why?
Since `URL.canParse` is incompatible with older browsers like Safari 16,
we added `canParseUrl` util at
https://github.com/vercel/next.js/pull/70215.
x-ref: https://caniuse.com/?search=URL.canParse
To improve maintenance, we decided to add polyfill for `URL.canParse`.
x-ref: [slack
thread](https://vercel.slack.com/archives/C07BVA6HM17/p1726664071636899?thread_ts=1726620161.450109&cid=C07BVA6HM17)
Closes NDX-302
---------
Co-authored-by: Jiachi Liu <inbox@huozhi.im>