rustc: Make metadata::encoder::encode_path take an &path

Eliminates some bad copies.