Make DistinctBy implement Accumulator interface

Also added exec and accumulate tests for DistinctBy