haddock docs: Fix links from identifiers to dependent packages
When implementing the base_url changes I made the pretty bad mistake of
zipping together two lists which were in different orders. The simpler
thing to do is just modify haddockDependencies
to also return the
package identifier so that everything stays in sync.
Fixes #22001 (closed)