Sort project resources
Adds logic to sort project resources so that all model resources are deleted before attribute resources. Otherwise resource observers in attribute editors could get triggered when the editor is in the process of being destroyed. This MR also saves the project state when a model is imported into an existing project, to maintain consistency between the .smtkproject file and the project directory.
Backport: release