encoding/gocode: add Go code generator

Also:
- add gocodec used by generator
- added ability to create temporary Runtime (for concurrency)
- removed index freezing

The latter was only for precondition checking of
internal code.  At the same time, freezing could
lead to spurious races if Runtime is used
concurrently.

Note:
- gocodec is a separate package as it is useful
  on its own and that way it can be used without
  pulling all the dependencies of gocode.

Change-Id: Ib59b65084038b616c9fb725cbe152a56b8869416
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2742
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/gocode/test.cue b/encoding/gocode/test.cue
new file mode 100644
index 0000000..1d62a37
--- /dev/null
+++ b/encoding/gocode/test.cue
@@ -0,0 +1,3 @@
+import "strings"
+
+a: strings.ContainsAny("X") & "car"