Merged requested to merge work/fix-stash-restor-multi-docs into master
If you have more than 1 stashed doc and you close kate, only one of the stashed documents might get a view. The others won't. This change fixes that.
This happened because when we created the viewmanager, we immediately tried to register all the documents in the current viewspace and destroyed this viewspace immediately afterwards when we restored the viewspaces.
It is still partly broken i.e., the views for stashed docs are created but the active view is incorrect because of how the config is restored i.e., based on URLs, but untitled docs don't have URLs. But this can be fixed later.