By having one Rust binary per version, we can vary the actual binary from
version to version and f.e. fix deprecated API calls. It does introduce a bit of
duplication between the different versions but I'd rather have that then not
being able to adapt the tests to new APIs.
Instead of activating a feature per libp2p version, we add them all as
dependencies. This ensures all transitive dependencies are properly tracked in
`Cargo.lock`. Additionally, this gives us a single place we are can activate all
the feature.
For `master` and pull-request builds, we replace the git target or rev with the
one coming from the CI build. Once we trigger a build, `cargo` will update and
resolve the necessary dependencies before that, thus fixing problems such as
https://github.com/libp2p/rust-libp2p/pull/2972.