SOLR-6509, SOLR-6486, SOLR-6549, SOLR-6529: backport recent fixes / improvements to the bin/solr scripts for inclusion in 4.10.2 release.

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