Fix the start with last selected view feature
Closing the file switches to the home view and that was stored last so
the feature was not working properly. This has now been fixed by not
storing the view change when no file/db is opened. Also, the switch to
the default view is postponed until the event loop is running.
Otherwise, the view was not displayed properly.
CCBUG: 398957
FIXED-IN: 5.0.2