When a dependency gets fetched from Git, it's possible for its name to
contain slashes - e.g. because the dependency's branch name contains
one:
```
something-something = { git = "...", branch = "JIRA-123/dev" }
```
Currently, because we don't sanitize those slashes, trying to compile
such `Cargo.toml` / `Cargo.lock` would fail - e.g. given a dependency
from branch `JIRA-123/dev`, we'd try to extract it into path
`JIRA-123/dev` instead of something flat such as `JIRA-123_dev`.
This commit fixes this issue by sanitizing all the `nkey`s - basically,
for all dependency paths, we replace `/` with `_`.
The choice of underscore is arbitrary, just seemed like a good fit.
Apparently the cargolock env var can become too big so we replace it
with a file. This fixes the following error:
building
'/nix/store/s8bv90acizsyvh1s9gk7yvpiyw2gcpnx-dfinity-application-and-others-deps.drv'...
while setting up the build environment: executing
'/nix/store/cinw572b38aln37glr0zb8lxwrgaffl4-bash-4.4-p23/bin/bash':
Argument list too long
See the following on the background of why env vars can become too big:
https://stackoverflow.com/questions/28865473/setting-environment-variable-to-a-large-value-argument-list-too-long