I can't really speak for working in a non-current Space, other than to save that Apple doesn't allow developers to do it very easily. In one of our apps, we can't see off-space windows unless the user has manually activated those spaces, and we can't update the list of windows on other spaces until users again visit those spaces.
I don't think I've ever seen an AppleScript that can execute commands on windows in other spaces, but maybe there's one out there. There are macros here that deal with windows and spaces; @_jims has a very rich version:
As I don't use spaces at all (I prefer having all my windows in one spot), I can't say how well it works, but it might show you some tips for doing what you want to do.
As for restoring open documents, you can make it so that no apps restore their last-opened documents. Go to System Settings > Desktop & Dock, and enable "Close windows when quitting an application." The subtext to that reads "When enabled, open documents and windows will not be restored when you re-open an application."
With that enabled, just quitting all the apps may be all you need to do.
-rob.