Add multisig functions to Script.js for use in cosign

These functions were imported from cosign, as they are better put in bitcore than in cosign.