This moves the calculation of selected words that was originally
in the TextEditor application to TextEditor in LibGUI.
This allows all applications with text editors to get
this number without having to calculating it themselves.
This changes (context) menus across the system to conform to titlecase
capitalization and to not underline the same character twice (for
accessing actions with Alt).
The HTML and Markdown preview modes both use an OutOfProcessWebView to
render the preview pane, and we were instantiating this view from GML.
This caused us to always spawn a WebContent process alongside every
TextEditor instance.
Fix this by deferring the OOPWV construction until we actually need it.
This makes launching TextEditor on a text file quite a bit faster. :^)
This was quite unreliable before. Changes to the undo stack's modified
state are now reflected in the document's modified state, and the
GUI::TextEditor widget has its undo/redo actions updated automatically.
UndoStack is still a bit hard to understand due to the lazy coalescing
of commands, and that's something we should improve upon (e.g with more
explicit, incremental command merging.) But for now, this is a nice
improvement and undo/redo finally behaves in a way that feels natural.
Instead of tracking this stuff ourselves at the application level,
we now just act as an intermediary and pass along the information to
the windowing system.