fdo#71429: sw: fix crashes when changing header first sharing

Copy some nutso code in SwUndoPageDesc::ExchangeContentNodes() to
work on the un-shared First header/footer too, which apparently avoids
the crash.  It's not like Undo of header/footer isn't already a
house of cards anyway.

Change-Id: Ie6593c4784ce9d368a5098ffb3aa4dec536d250e
(cherry picked from commit 899538a155b0d58f3a864dbc26d0dc7c37386807)
Reviewed-on: https://gerrit.libreoffice.org/7159
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>