Make DistinctBy implement Accumulator interface, add tests