Refactor how shouldDeselect is determined

Use a function in globalSettings to ask for this - inside there plugins
are able to define if they want to always deselect or not. The global
alwaysDeselect property takes precedence of course.
Deselect after every depTree action