gh-69371: Fix pydoc for modules whose path contains undecodable bytes (GH-155239)

"python -m pydoc -w" and the pydoc HTTP server failed with
UnicodeEncodeError.  The file URL is now created with
urllib.request.pathname2url(), which percent-encodes the path using the
filesystem encoding, and characters unencodable in the generated UTF-8
page are escaped with backslashes.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
3 files changed