auto persist workspace

fixes https://github.com/dart-lang/spark/issues/2621 - deleted folders showing up when spark is re-launched.

The workspace now auto-persists the roots whenever one of them is modified. Previously, clients of the api were responsible for knowing the persist the workspace after they made top-level modifications.

@keertip
Saving a preference file appears to be a light weight operation. I will prefer to make it `sync` unless it affects performance significantly. We can a add a comment to make it `async` in future if required.