Harden editor title: strip .md on commit, survive concurrent renames, track peers
Three related fixes to the markdown editor's title handling.
MarkdownEditor.commitTitle used to unconditionally append ".md" to whatever
the user typed, so a paste of "foo.md" became "foo.md.md". Strip the
extension before comparing and re-appending.
EditorView.handleRename applied optimistic updates with a captured
"previous" value. Two renames in quick succession where the first fails
after the second has already applied would roll the title back past the
second rename. A generation counter filters out stale rollbacks — only
the most recent call's failure is allowed to undo its own optimistic write.
useDocumentContent was one-shot, so a peer renaming a document elsewhere
never flowed into the title input here. Subscribe to the parent directory's
metadata via useDirectoryMetadata (routes now pass parentDirectoryUri) and
sync displayName when peerName changes. MarkdownEditor already refuses to
clobber the user's in-flight keystrokes via a document.activeElement check,
so the sync is safe while editing.
documentDirectoryPathSuffix had no remaining callers after the route
rewrite; drop it.