internal/core/runtime: add Build method
internal/core/runtime: add Build method

Build recursively compiles build.Instances and adds them
to the index.

Change-Id: I86da737449f66dee7d9f8124b68813b2d11d074a
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6510
Reviewed-by: Marcel van Lohuizen <a22d082192f3ccf984644a4f482781f4c2d65180@golang.org>
Reviewed-by: CUE cueckoo <0f32a827c9a5f00281f936ac78b5ef3ba80a954c@gmail.com>

cuelang/cue