SOLR-4926: Fixed rare replication bug that normally only manifested when using compound file format.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1497020 13f79535-47bb-0310-9956-ffa450edef68
LUCENE-5079: IndexWriter.hasUncommittedChanges()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1497039 13f79535-47bb-0310-9956-ffa450edef68