Close windows when last plot layer is deleted

Closes #391
Clear subset state caches on update_components

Closes #372
Suppress profile window from popping up when restoring saved session with image widget

Closes #371
Merge pull request #418 from ChrisBeaumont/371

Suppress profile window from popping up on session restore