Bitcoin script: HashToSign

Completed the tx.HashToSign function which returns the input of ECDSA
for
signing/verifing signature.