Fixed two major flaws in our implementation of document locks: since a read lock can be acquired by more than one thread, we have to keep track which thread releases which lock. Also, a thread may try to acquire the same lock more than once.
Fixed two major flaws in our implementation of document locks: since a read lock can be acquired by more than one thread, we have to keep track which thread releases which lock. Also, a thread may try to acquire the same lock more than once.

svn path=/trunk/eXist/; revision=5835

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