Make all browser-facing API paths and WebSocket URLs relative so that
vite's <base href> can resolve them correctly when pi-web is served
from a subpath (e.g. /ai or /test/ai).
Also introduce PI_WEB_BASE_PATH so the server can generate plugin
module URLs that include the base path.