fix visibility issues in the outline view

@umop, fix:

- the outline view being visible at startup if there are no open files
- an issue where `deactivate` was not called when a file was closed, leaving the outline view open w/ no open files when the last file was closed.