Autosave trashes file

This fixes the possibility of autosave trashing a file when closing it before the autosave kicks in. It now saves nicely. The reason for this was that the events weren't unregistered from the document on closing, thus when the save event kicks in and asks for the retrievevalue, this event still exists. However it doesn't have a document thus returns undefined. There is no check for this and undefined is PUT'ed on the server.

However, there is a bug left that I can't tackle, and that is that when you do the closing before autosave, autosave won't work on that file anymore. The reason for this is:

* Check the model in `autosave@save`
* Check the model in `editors.js page.$at.addEventListener("afterchange", function(e) {`

They differ?! One seems to be a concorde document or something, and the other a normal one. Anyway they are not connected anymore and thus doesn't autosave detect that content has changed. If anyone wants to look at this (@javruben ?) feel free. I have no clue.