bug #9754: rendering of articles with many links

This is only a partial fix; it speeds up the case where many identical links
are present within the same email.

It speeds up the case mentioned at http://bugs.otrs.org/show_bug.cgi?id=9754
from 17.48 ± 0.23 s to 1.76 ± 0.06 s.
Merge branch 'bug-9754' of https://github.com/moritz/otrs