Improve performance when computing the "readable" form of a page in EWW
The previous version made a lot of string copies, but only needed the
word count of each DOM node. In this version, we just sum up the word
counts in all the existing nodes, which results in a significant
performance improvement (bug#78902).
* lisp/net/eww.el (eww--string-count-words, eww--dom-count-words): New
functions...
(eww--walk-readability, eww-readable-dom): Use them.
(cherry picked from commit
c5f649441e2e055701c7bee811eaf266c4f0e7ce)