Huh, why?
Creating a SHA-1 collision is doable, but it's still hard. If you want to serve someone a malicious piece of data, that's already one hash of the two colliding hashes that you've used up. Now you have to create harmless or "benevolent" data that collides with the hash of your malicious data so that you can create a positive reputation for your file from users who aren't your targets. That way, when your target inevitably goes to download the file, you wrestle into the protocol with a lot of speed and/or nodes, and you serve the malicious data to your target instead of the data you've been serving to everyone else.
If you don't need the positive reputation, and someone will just download and run whatever you put in the torrent, you don't need the collision in the first place.
That is a much more serious weakness called a "second pre-image attack"
This class of attacks is MUCH harder to construct against a cryptographic hash.
Both are not based on Libtorrent.
[edit]
That doesn't imply that BTv2 is the right successor protocol.
Also, this seems quite bad: https://en.wikipedia.org/wiki/Collision_attack#Chosen-prefix...
I'm not even convinced they couldn't have done it in a backwards compatible way. Why not stick with SHA-1 but also add SHA-256 for verification for clients that support it?
Apparently you can do that with 'hybrid' magnet links.
The problem is the two swarms are different so as more people move over to v2 the v1 swarms will become smaller and smaller -- thus giving people an incentive to upgrade, I suppose.
...and they seem to have solved more than one minor issue since they were breaking things anyway...