[bitcoin/bitcoin] Scripts and tools: gitian-build.py improvements and corrections (#13998)

@hebasto pushed 1 commit.

3016e44 refactoring