Fix a case in which an expanded subdirectory causes parent from loading fully.
Save tree state when folders are toggled via toggleSubdirectories and closeSubtree.

Fix for #9269.
Save tree state via show in file tree.

Fix for #9276.
`.then` for toggleSubdirectories should saveTreeState at the correct time.
Merge pull request #9287 from adobe/dangoor/expand-collapse

File tree expand/collapse tree state fixes