And add some asserts, to make sure we don't add attributes outside of
opening tags. Make sure that HtmlWriter closes its opened elements.
Replace one occurrence where this was deliberately not done, with a
use of HTMLOutFuncs::Out_AsciiTag.
Change-Id: I3a3f4b963432bf95b36afa62cac2144503837378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159935
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>