De-duplicate dependencies with the same import path (#1785)

go_library may depend on a library in deps with the same importpath as
a library in the deps of an embedded library. The embedding
go_library's dependency takes precedence (in other words, the embedder
overrides).

Previously, we could end up with multiple libraries with the same
importpath in the importcfg for the compiler. The compiler does not
report an error and accepts the last entry, which would come from the
embedded library. This has led to package height errors with
go_proto_library.

Fixes #1772
8 files changed