rust: Depend on CC a shared library's TOC, not .so

CC libraries generate TOC files which contain the list of exported
symbols. By depending on the TOC file instead of the .so, changes to
shared library dependencies will not result in rebuilding Rust
dependencies as long as the exported symbols remain unchanged. This
should improve incremental build times during development.

This also includes a minor fix where exported linkObjects should be
deduplicated to avoid the same object being included many times.

Bug: 173619911
Test: m libkeystore2; modify a bionic file; m libkeystore2
      doesn't rebuild the rust target.
Change-Id: I6383217c125bf8dd7125a5e013a78754cac4edf2
diff --git a/rust/builder.go b/rust/builder.go
index e5f0ab5..baeab69 100644
--- a/rust/builder.go
+++ b/rust/builder.go
@@ -188,7 +188,7 @@
 	implicits = append(implicits, rustLibsToPaths(deps.DyLibs)...)
 	implicits = append(implicits, rustLibsToPaths(deps.ProcMacros)...)
 	implicits = append(implicits, deps.StaticLibs...)
-	implicits = append(implicits, deps.SharedLibs...)
+	implicits = append(implicits, deps.SharedLibDeps...)
 	implicits = append(implicits, deps.srcProviderFiles...)
 
 	if deps.CrtBegin.Valid() {