(Copyable)ValueComparator use ascending flag, tests added

#812