pkg: remove usages of cue.Runtime in tests
This replaces various usages of cue.Runtime in tests with the equivalent
*cue.Context methods.
`cuecontext.New` can't be used directly, as this causes an import cycle.
A `newContext` method already existed for creating a cue.Context, and
is extracted to a shared internal func for reuse across pkg/...
Also, some typos are fixed.
Updates #2480.
Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I9bcf3011096a17c3a7f81e80c57414a9b9d9b7b2
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194868
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
authored by