Replace uses of doc.url with _server.pathToUrl()

For #5317. `doc.url` was an old field that used to get set on the document before we refactored the live dev server management in 1f6b5aa, but there were still a few places referencing it.