fix tiebreaks with distrib facet sorting, add numBuckets support