SwXText::convertToTable(): assert that SwTable is client of table format

... which is wild guessing related to crash in rhbz#1010982.

Change-Id: Ifbd9309a5cff1fff3a8c6022d3a20b2b8c175dce
rhbz#988516: DOCX import: fix context stack when importing header/footer

When a header/footer substream is parsed, a ParagraphGroup is started,
but not ended; so the properties of the last paragraph in the
header/footer are applied to a paragraph in the body.

The obvious fix to add a call to endParagraphGroup() at the end of w:p
element breaks table cells.  So add a call to endParagraphGroup() at
the end of the "hdr"/"ftr" element.

(The problem in the bugdoc became much more visible with commit
ca555c596043c88894b964ac5e21f5a7271d5f3b, but was there before)

Change-Id: Ib054f1882793049b39424c1076ba5d4b319cd027