std: Add an is_parent_of method to Path
rustpkg: Search for packages correctly when using the rust_path_hack

Previously, any package would match any other package ID when searching
using the rust_path_hack, so long as the directory had one or more crate
files in it. Now, rustpkg checks that the parent directory matches the
package ID.

Closes #9273
auto merge of #9498 : catamorphism/rust/rust-path-hack-fix, r=cmr,metajack

r? @metajack