LUCENE-5371, LUCENE-5339: speed up range faceting from O(N) per hit to O(log(N)) using segment trees; simplify facet APIs

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