rustpkg: Register correct dependencies for built and installed files

as per #9112

Closes #9112
auto merge of #9322 : catamorphism/rust/rustpkg-discovered-outputs, r=brson

r? @brson as per #9112

Closes #9112