all: implement hidden identifiers scoped per-package

This has been part of the spec for a long time, but never implemented.

Note that all files with the same package name within a module
belong to the same package. A hidden identifier is thus uniqued by
module+name.

Closes #65
Fixes #503

Change-Id: I6d97ca1dbcf4ccc5730fde2cf8193c8e667787ad
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7361
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/internal/core/validate/validate_test.go b/internal/core/validate/validate_test.go
index 496ad3b..fd88dd6 100644
--- a/internal/core/validate/validate_test.go
+++ b/internal/core/validate/validate_test.go
@@ -174,13 +174,13 @@
 			if err != nil {
 				t.Fatal(err)
 			}
-			v, err := compile.Files(nil, r, f)
+			v, err := compile.Files(nil, r, "", f)
 			if err != nil {
 				t.Fatal(err)
 			}
 			ctx.Unify(ctx, v, adt.Finalized)
 			if tc.lookup != "" {
-				v = v.Lookup(adt.MakeIdentLabel(r, tc.lookup))
+				v = v.Lookup(adt.MakeIdentLabel(r, tc.lookup, "main"))
 			}
 
 			b := Validate(ctx, v, tc.cfg)