SwRootFrm::~SwRootFrm: refactor:
Since CWS swlayoutrefactoring the SwRootFrms are destroyed with
SwDoc::IsInDtor not set. This can cause at least reads of freed
SwRootFrm members when executing the dtors of SwRootFrm base class
SwLayoutFrm calling into SwRootFrm::GetPageAtPos.
Prevent this scenario by:
- moving the implementation of SwRootFrm base class dtors to new
methods SwFrm::Destroy and SwLayoutFrm::Destroy
- calling SwFrm::Destroy and SwLayoutFrm::Destroy explicitly before
SwRootFrm members are freed
(cherry picked from commit
ebb74441790a9852b1a1532d6e025c324666f6fc)
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>