Only close workspace if all panes are empty

Before this change, closing the last file in pane A will close the workspace even if a split pane (Pane B) still had open files. This change makes sure all editor windows in the workspace are closed regardless of how many panes there are.