This commit adds a step, which is to git checkout the version to be
built. This ensures that the gitian-descriptors for said version will be
the correct ones. In addition, it updates the links for several
dependencies, where the previously existing links were dead.
Workaround 1.54.0 build bug, upstream #9156
Workaround 1.51.0+ human bug, upstream #7262
This commit also demonstrates a method to verify the integrity of inputs.