LUCENE-1135: fix concurrency issues in IndexWriter when calling commit, rollback, close, optimize, addIndexes*