Close all open windows if the project gets destroyed

The majority of the available windows/widgets is depentend on the
current project. Therefore it makes sense to close all windows when the
project is destroyed. This fixes #501.