ScriptedJsonPatcher now uses previously-updated doc if a patch is for a doc that was updated in the same batch.
Changing the way we are handling touching of modified documents _during_ the indexing process.
We'll now re-touch all documents that have been added to the tracking, not just those who were missing.
Merge branch '2.5' of github.com:ayende/ravendb
Avoid error if document was already changed.
Properly using the document lock
Making sure that we are running outside of the ambient transaction
Merge branch 'scripted-index-multi-update' of https://github.com/gareththackeray/ravendb
Added logging to errors during concurrency errors for touching
Merge branch '2.5' of github.com:ayende/ravendb

Conflicts:
	Raven.Database/DocumentDatabase.cs
	Raven.Database/Impl/DTC/EsentInFlightTransactionalState.cs
	Raven.Database/Tasks/TouchMissingReferenceDocumentTask.cs
Adding logging.
Trying to make sure that we don't miss updates during indexing
Fixing missing continue in deciding to recheck LoadDocument reference
Better way to wait of the task
Solving issue with patching and PutDoc(null key) or PutDoc(identity key)
RavenDB-2396 we must update indexing stats after lucene flush, because we need to be sure that lucene has succeeded
RavenDB-2408 Projecting results while streaming gives null Key in results
more index corruption checks
hash calculation fixes
more fixes to index corruption detection
better index corruption validation
reverting unneeded changes in tests