SOLR-5818: distrib search with custom comparator does not quite work correctly

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_7@1580987 13f79535-47bb-0310-9956-ffa450edef68
SOLR-5777: Fix ordering of field values in JSON updates where field name key is repeated (merged branch_4x r1572271)

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