all: make use of adt.Pos consistently
To call adt.Node.Source().Pos() safely with nil checks.
We had two other "pos" funcs, in the cue and adt package,
as well as various hand-rolled versions in many func bodies.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I7d02082fc5759867751f1babd0f9a163d0203ff9
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1227393
Reviewed-by: Matthew Sackman <matthew@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>