[Chore] Unbreak rust_pre_commit for UNIX
Summary:
Setting PATH to a directory also unsets how to find commands.
So cargo fmt would just return command not found: cargo.
This uses a different variable other than PATH to reference the directories.
Likely this was overlooked, because it doesn't look like anyone has touched the
rust files since this hook was introduced.
Also: not everyone has a $HOME/.cargo/env, and command -v <command> is the canonical POSIX way to check if a command exists on PATH
Test Plan:
# change something under services/commtest git add services/commtest git commit --dry-run # should succeed
Reviewers: abosh, atul, varun
Reviewed By: atul
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D5101