RTF import: fix spurious page breaks at doc end (related: rhbz#1065629)

When a document ends with \sect it's possible that a spurious page break
is created.  In fact the spurious page break is always created by the
RTF importer, sometimes it is deleted again by
DomainMapper_Impl::RemoveLastParagraph() and sometimes not.

It is created because on the final \sect RTFDocumentImpl::sectBreak()
still calls startSectionGroup(), and the popState() for the \rtf1 group
then calls sectBreak() another time.

To prevent this, do not call startSectionGroup() from sectBreak() but
instead from setNeedSect(), and ensure that it is called as soon as
anything after \sect is read.

One unit test fails because the \page is not handled properly: the
conversion to \skbpage \sect \skbnone is not correct, because the \skb*
keywords are an exception and affect the \sect that precedes them, not
the following one; sending the \skbpage later unfortunately requires
additional cleanup later.

(cherry picked from commit e3f254ab8211fbab7541cde2100a35c875b0c240)

RTF import: add unit test for page break in continuous section

(cherry picked from commit f03218f43e8c25c2e136d364455f3cdaf95362b6)

RTF import: fix paragraphs in header/footer

(cherry picked from commit 74b3f4f00766d199df3b017d056cf7a00ae52988)

Change-Id: I3c1a3bceb2c8b75bbecdc748170562451ce5f5c3
Reviewed-on: https://gerrit.libreoffice.org/8439
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>