bazel syntax: remove element validity check from Depset builder used by Starlark

commit bbde22993476d5265baadba022be35852c5101d7 copied the element validity check used in the constructor
into the Builder as well, which seems sound, except that existing user
code exploits the Builder's weaker checking to create a depset of Target,
which is apparently neither hashable nor immutable.

This CL removes the check from the Builder until I have a chance to analyze it more carefully.

PiperOrigin-RevId: 281886755
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Depset.java b/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
index fde1f11..ae7b72e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
@@ -462,7 +462,9 @@
 
     /** Adds a direct element, checking that its type is equal to the elements already added. */
     public Builder addDirect(Object x) throws EvalException {
-      EvalUtils.checkValidDictKey(x);
+      // TODO(adonovan): this check causes depset(Target) to fail (see reviewlog).
+      // Investigate how/why user code is exploiting the weak check.
+      // EvalUtils.checkValidDictKey(x);
       SkylarkType xt = SkylarkType.of(x);
       this.contentType = checkType(contentType, xt, location);
       builder.add(x);