SOLR-5914: Merge branch up to trunk, make all tests pass, make some other improvements and small changes.