wenzelm [Tue, 29 Dec 2009 20:40:08 +0100] rev 34808
eliminated global Session.document_0 -- did not work due to hardwired id;
more precise Session.begin_document, avoid race on var prover;
replaced slightly odd Session.document_versions by Sassion.documents table (cf. src/Pure/Isar/isar_document.ML);
simplified edit_document in ML: initial empty command is identified by "";
misc tuning;