* Fixed locking error: a collection object could be unloaded from the cache by one thread, while another thread had still been writing a document being a member of the collection. A moment later, a third thread reloaded the collection and started to write to the same document. However, as the collection had been recreated, there were two instances of the same document in memory. The third thread did thus not respect the lock held by the first thread and started to write without waiting. As a consequence, various page errors were thrown.
* Fixed locking error: a collection object could be unloaded from the cache by one thread, while another thread had still been writing a document
being a member of the collection. A moment later, a third thread reloaded the collection and started to write to the same document. However, as
the collection had been recreated, there were two instances of the same document in memory. The third thread did thus not respect the lock held
by the first thread and started to write without waiting. As a consequence, various page errors were thrown.

* When updating a document, the old document metadata had not been correctly removed. Usually, this had no consequences as the collection class
only used the last record it found. In some cases however, this may have led to errors.

svn path=/trunk/eXist-1.0/; revision=479

wshager/exist,joewiz/exist,jensopetersen/exist,patczar/exist,eXist-db/exist,zwobit/exist,jessealama/exist,joewiz/exist,wolfgangmm/exist,ambs/exist,MjAbuz/exist,RemiKoutcherawy/exist,windauer/exist,jessealama/exist,shabanovd/exist,windauer/exist,adamretter/exist,ambs/exist,ljo/exist,hungerburg/exist,ambs/exist,olvidalo/exist,ambs/exist,kohsah/exist,wshager/exist,joewiz/exist,olvidalo/exist,adamretter/exist,eXist-db/exist,eXist-db/exist,lcahlander/exist,RemiKoutcherawy/exist,ljo/exist,lcahlander/exist,MjAbuz/exist,wshager/exist,olvidalo/exist,dizzzz/exist,windauer/exist,wshager/exist,MjAbuz/exist,jensopetersen/exist,patczar/exist,shabanovd/exist,wshager/exist,patczar/exist,ljo/exist,patczar/exist,opax/exist,dizzzz/exist,RemiKoutcherawy/exist,MjAbuz/exist,joewiz/exist,shabanovd/exist,wolfgangmm/exist,zwobit/exist,windauer/exist,shabanovd/exist,jensopetersen/exist,ljo/exist,ljo/exist,hungerburg/exist,zwobit/exist,jessealama/exist,opax/exist,MjAbuz/exist,RemiKoutcherawy/exist,RemiKoutcherawy/exist,eXist-db/exist,windauer/exist,jensopetersen/exist,shabanovd/exist,kohsah/exist,adamretter/exist,wolfgangmm/exist,kohsah/exist,opax/exist,dizzzz/exist,lcahlander/exist,eXist-db/exist,kohsah/exist,hungerburg/exist,adamretter/exist,dizzzz/exist,MjAbuz/exist,patczar/exist,zwobit/exist,jensopetersen/exist,olvidalo/exist,opax/exist,jessealama/exist,patczar/exist,joewiz/exist,jessealama/exist,dizzzz/exist,kohsah/exist,joewiz/exist,eXist-db/exist,hungerburg/exist,kohsah/exist,ljo/exist,jensopetersen/exist,RemiKoutcherawy/exist,wolfgangmm/exist,olvidalo/exist,zwobit/exist,hungerburg/exist,wshager/exist,ambs/exist,lcahlander/exist,adamretter/exist,lcahlander/exist,wolfgangmm/exist,windauer/exist,wolfgangmm/exist,ambs/exist,dizzzz/exist,zwobit/exist,lcahlander/exist,opax/exist,shabanovd/exist,adamretter/exist,jessealama/exist