Add basic sanity checking for script pushdata size
Summary:
This allowed to uncover several errors in the json test suite.
The checking right now is rather basic, but should catch a good chunk of errors. Actually checking for size when faced with pushdata and when pushing integer literals and/or opcodes. Convertly, we should check that no push is present when no push is expected.
Depends on D1292, Relates to T327
Test Plan:
make check
Added a test for ParseScript. It's barebone for now, but at least cover the functionality added.
Reviewers: #bitcoin_abc, jasonbcox, schancel
Reviewed By: #bitcoin_abc, jasonbcox, schancel
Subscribers: matiu, schancel, jimpo, jasonbcox, teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1293