File tree expand/collapse tree state fixes

Fixes:

* #9269 
* #9276 
* unreported case where expanded subdirectory causes parent to not fully load #9293 
* #9300 

cc @ingorichter 
Depending on what idiom you want, this could be `.then(_saveTreeState)` too.