MainWindow: fix crash when switching pages with bottom_widget

The bottom_widget was only visible when there was no "main" widget;
with a main widget, we must not call bottom_widget->Hide(), and
bottom_widget->Move().  This patch adds a few missing
"widget==nullptr" checks.  Fixes TRAC #3012, #3231, #3395.