SOLR-5330: make copy of term bytes before calling next

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_5@1532905 13f79535-47bb-0310-9956-ffa450edef68
LUCENE-5289: IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_5@1533168 13f79535-47bb-0310-9956-ffa450edef68
LUCENE-5289: clarify that hasUncommittedChanges can still be true after commit, due to merges

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