Bug 707255 - Open preferences when quitting causes assertion failure.

Wrong order of destruction functions were causing critical warnings on
g_signal_handlers_disconnect_by_func() calls.
Also g_object_ref/unref() the container because the tree handler might
hold the last ref to the container, once it's disconnected the container
could be gone.
(cherry picked from commit 04a3c65aa1f68c99538d86c97649ec4884822030)
Bug 707255 - Open preferences when quitting causes assertion failure

When removing the container of a GimpContainerView,
gimp_container_view_remove_container() must be the last call. It was
causing a `GIMP_IS_CONTAINER (container)' failure in subsequent
gimp_container_get_children_type().
For good practice, unsetting a container works now the exact reversed
order as the setting of a container.
(cherry picked from commit 338e0ddf8d1c128e3873d6e9ad9a52577b48b1dd)