This fixes a regression introduced with commit e58804bf9eb8
("React to config updates inside indexer").
The recursion should stop when it reaches an explicitly included folder,
thus pass shouldDelete also into the iteration for excluded folders.
The current unconditional removal causes recurrent indexing of included
subtrees on each login.
Do a depth first walk, and after returning check if there are any
children left. Only delete the folder if it is empty. Otherwise, the
directory tree structure has dangling subtrees.