LUCENE-5481: merge back to 47x

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_7@1578528 13f79535-47bb-0310-9956-ffa450edef68
LUCENE-5522: backport to 4.7.x

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_7@1578529 13f79535-47bb-0310-9956-ffa450edef68
LUCENE-5525: backport to 4.7.x

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