Cache shortened channel names in erc-track
* lisp/erc/erc-track.el (erc-track--shortened-names): New variable to
stash both the latest inputs and most recent result of
`erc-track-shorten-function'.
(erc-track--shortened-names-current-hash,
erc-track--shortened-names-set, erc-track--shortened-names-get): New
pair of generalized-variable functions and helper variable for
accessing and mutating `erc-track--shorten-prefixes'.
(erc-modified-channels-display): Avoid redundant calls to
`erc-track-shorten-function'. Mainly for use during batch processing.
* test/lisp/erc/erc-track-tests.el (erc-track--shortened-names): New
test. (Bug#67767)
(cherry picked from commit
0f058244ab7c4c2e5cb3fa5e4775c0f3cbe78e19)