txscript: Make typeOfScript accept raw script.
txscript: Make typeOfScript accept raw script.

This converts the typeOfScript function to accept a script version and
raw script instead of an array of internal parsed opcodes in order to
make it more flexible for raw script analysis.

Also, this adds a comment to CalcScriptInfo to call out the specific
version semantics and deprecates the function since nothing currently
uses it, and the relevant information can now be obtained by callers
more directly through the use of the new script tokenizer.

All other callers are updated accordingly.

davecgh/btcd,ltcsuite/ltcd,btcsuite/btcd,davecgh/btcd,tb00/btcd,tb00/btcd,ltcsuite/ltcd,btcsuite/btcd