internal/lsp: simplify processing of package imports
Now that we explicitly model imports within a Package (as well as the
inverted import graph "pkg.importedBy"), and definitions understands how
to find the canonical form of an import, we can can simplify how
Packages process imports.
Signed-off-by: Matthew Sackman <matthew@cue.works>
Change-Id: I62af343f9c32d63e5b6def486805f0652aead059
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1225184
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>