Merge pull request #2114 from sipa/strictstrict
Make IsCanonicalScript() check the hash type more thoroughly