I agree, it's not something that would be terribly hard to implement for Apple, it would merely be a new message, 'safe quit' instead of 'quit'. It's getting the applications programmers to go along that's hard. Take your Applescripting idea, it would be easy to write a script that goes through each running application, tells them to save to a temp folder and quit, then write a list of those apps and their open documents to a file, then write another script that reads that file and reopens the apps and their documents. Dead easy, right? Except that you'll quickly realize that not all applications implement even simple apple events, including ones written by Apple itself. Applescript has been around since system 7, I think, and Apple has been making it easier and easier to include support in your program, but a fair amount of apps still don't use it.
That's what I mean by complex, Apple would have to really push programs to add the feature and it would probably take a while before everything included it.
It really is a nice feature idea, I seem to remember discussions about things like this back in the 90s when 'future OSs' were discussed. The gist was that the OS would always be aware of its state and be able to return to it no matter what happened, power failure, sudden shutdown, hardware problems, system update, even kernel replacement. Current deep sleep and hibernate modes are really just a hack compared to that, they just take a snapshot of memory to disk.