BIP-375's test runner does not check the signatures in the test vectors, so master's vectors pass although none of their signatures verifies. This PR adds bip-0375/signatures.py, which the runner applies to every vector. It checks that each P2PKH, P2WPKH and P2SH-P2WPKH program commits to its input's keys, that a P2SH program commits to its redeem script, that each sighash byte matches PSBT_IN_SIGHASH_TYPE where that field is set, and that each signature verifies. A signature whose sighash cannot be computed, such as one on a segwit v2 input, counts as a failure, not a skip. The validator is unchanged.
This PR depends on #2316, which fixes the vectors, and contains its commit: only the last commit is new. With #2316's vectors the runner reports 43 passed; with master's, 39 of 43 fail. hash160 now uses a copy of bip-0352/ripemd160.py, because hashlib lacks RIPEMD-160 on some systems, as #1616 found for BIP-352.