SOLR-4623: When serializing similarity factories, don't reduce class names of Similarity's wrapped with the anonymous factory to 'solr.<SimpleClassName>'; also, only reduce the class name of sim factories located in the org.apache.solr.search.similarities package, rather than that of any sim factory under packages org.apache.lucene.** and org.apache.solr.** (merged trunk r1461378)

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