ItemsToDelete is not threadsafe - fixing this via lock to avoid potentia...

Get the following error on production system - might be the source for the other problem fixed in previous pull request

The code in singlestepreduce starts background threads all using the same ItemsToDelete List, so this fix will make it thread safe.

An alternative would be to use var itemsToDelete = new ConcurrentSet<object>(); instead of List<object>(); in ReducingExecutor.HandleReduceForIndex, but then some interfaces has to change signature.....


Error:
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.<GetItemsToReduce>d__5b.MoveNext() in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Storage\Esent\StorageActions\MappedResults.cs:line 282
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Raven.Database.Indexing.ReducingExecuter.<>c__DisplayClass45.<>c__DisplayClass47.<SingleStepReduce>b__34(IStorageActionsAccessor actions) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\ReducingExecuter.cs:line 227
   at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action`1 action, EsentTransactionContext transactionContext) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 665
   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 617
   at Raven.Database.Indexing.ReducingExecuter.<>c__DisplayClass45.<SingleStepReduce>b__33(IEnumerator`1 enumerator) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\ReducingExecuter.cs:line 219
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Raven.Database.Indexing.DefaultBackgroundTaskExecuter.ExecuteAllInterleaved[T](WorkContext context, IList`1 result, Action`1 action) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\DefaultBackgroundTaskExecuter.cs:line 182
   at Raven.Database.Indexing.DefaultBackgroundTaskExecuter.ExecuteAllBuffered[T](WorkContext context, IList`1 source, Action`1 action) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\DefaultBackgroundTaskExecuter.cs:line 108
   at Raven.Database.Indexing.ReducingExecuter.SingleStepReduce(IndexToWorkOn index, String[] keysToReduce, AbstractViewGenerator viewGenerator, List`1 itemsToDelete) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\ReducingExecuter.cs:line 289
   at Raven.Database.Indexing.ReducingExecuter.HandleReduceForIndex(IndexToWorkOn indexToWorkOn) in c:\Builds\RavenDB-Unstable-v2.5\Raven.Database\Indexing\ReducingExecuter.cs:line 52
   at System.Threading.Tasks.Task.Execute()