Fixed possible race cond

`IndexVersionAppendingProcessorFactory` holds commitLock while adding document
to avoid data race.