DOCX import: handle section break right after a ToC field

The symptom was that during the handling of the XE field, we tried to
access the top of the text append stack, but the stack was empty.

The situation is the following:

1) There is a multi-page TOC field.
2) The page break inside the field is described using a section break,
featuring headers, and the header contains a field that we map to a
fieldmark.
3) There is an XE field after all this.

The root cause was that during parsing of the header, some of the state
should be stashed away and restored when we're done. The new
HeaderFooterContext does exactly this, and now the number of push/pop
calls on the text append context match again.

(cherry picked from commit 153af84762f98d6c86c4c060b01402f40b2b0c24)

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I10f259fd9edb8bd719ae5bc8a43ed5ef8c708071
Reviewed-on: https://gerrit.libreoffice.org/13524
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>