less racefullitude in installs with many git dependencies

See #7006 for details on the problem, which this PR fixes (or attempts to fix) by making a number of small changes to how Git caching works (see below for the full list). This should also yield a small but noticeable performance increase on Git-heavy installs due to the much smaller number of filesystem operations done.

Work to be done:

- [x] replace recursive `chownr` with simple `chmod` of `.npm/_origins` and `.npm/_origins/_templates`
- [x] normalize Git URLs so differing URLs don't cause differing cached remotes and race conditions
- [x] cache packed Git clone into cache atomically
- [x] inflight a given cache destination when adding Git remotes to prevent duplicate work

Needs a test. Don't know how to write a test. :fried_shrimp: