improvement: quit on close last tab, if terminal_auto_restart_shell is true
fix: quit on close last tab, if allow_close true