OP_CHECKMULTISIG signature hash optimization

Rework OP_CHECKMULTISIG so each OP_CHECKMULTISIG only
hashes the transaction once for each different SIGHASH_ type.