Fix EZP-23345: headings inside tables are displayed using a wrong level

This PR resolves issue https://jira.ez.no/browse/EZP-23345

Headings in `ezxml` are indicated by their nesting level inside `section` elements. In case of headings inside tables, only sections inside the table should be considered. XmlText XSL stylesheet did not respect that and was calculating heading level by counting nesting sections up to the root level.

This fixes the issue for XmlText transformation to HTML and for transformation from `ezxml` to RichText's internal format. Transformation from RichText's internal format to `ezxml` is not affected.

Additionally fixed:

* anchor hashes were calculated in a way that made duplicate names (and accompanying ids) possible if the heading was on the same nesting level
* style attribute was incorrectly rendered with a newline character