optimize _.uniq (#1741)