vcl lifecycle: delete children in dispose.

We can no longer rely on smart ptr members getting destroyed and
tearing down children before parents in the new order.

Change-Id: Ib22df93443d98f53543d3a8ac322e965623148d0
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index cbc5de7..5e345f9 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -85,6 +85,9 @@ void Deck::dispose()
    // We have to explicitly trigger the destruction of panels.
    // Otherwise that is done by one of our base class destructors
    // without updating maPanels.
    for (size_t i = 0; i < maPanels.size(); i++)
        maPanels[i]->dispose();

    maPanels.clear();
    vcl::Window::dispose();
}
@@ -110,6 +113,8 @@ void Deck::Dispose (void)
    mpTitleBar.reset();
    mpFiller.reset();
    mpVerticalScrollBar.reset();
    mpScrollContainer.reset();
    mpScrollClipWindow.reset();
}

DeckTitleBar* Deck::GetTitleBar (void) const
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index eff5d6e..9b450cc 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -69,6 +69,8 @@ TabBar::~TabBar()

void TabBar::dispose()
{
    maItems.clear();
    mpMenuButton.reset();
    vcl::Window::dispose();
}