Test sighash (Transaction.hashForSignature())

This adds tests for Transaction#hashForSignature method, inspired in https://github.com/bitcoin/bitcoin/blob/7d49a9173ab636d118c2a81fc3c3562192e7813a/src/test/sighash_tests.cpp