Re-factor map tab management.

Also close all tabs when closing a project.
Fix crash when loading a project after closing a previous one. (Reader's bug - mainwindow.cpp#L116)