Cleanup of the distinct iterator.  Added tests for the distint iterator and iterable.