#Fix crash on empty tab

Add the ability to change the behaviour when you close the last tab:
- Either a new empty tab is added
- or the whole application exits