Cleanup some obsolete code in comments
Merge 'master' into empty-documents-validation
Validate drafts before saving

Also trim text fields of documents.

Also fixed error handling in routers
(done used when req.next should have been).