Make IsCanonicalScript() check the hash type more thoroughly

0 and 128 were previously accepted as standard hash type.

Note that this function is not active in the current verification code.