Don't measure character widths when editor is hidden

Fixes #2641

This PR delays character-by-character measurement in the lines component when the editor is hidden, just like we delay measurement of the line height and default character width already. This also updates the cursor position as soon as character widths are updated by emitting a `character-widths-changed` event with a change count integer. Using an integer was the easiest way to communicate to the cursors and highlights components that the scoped character widths have changed.