[ecash-script] Add new function getStackArray
Summary:
T3196
Add new function getStackArray to convert a valid eCash OP_RETURN outputScript to an array of data pushes.
`
consumeNextPush` and consume are available for more customized processing (e.g. alias-server uses the returnedWith pushdata from consumeNextData to validate for minimum pushes).
getStackArray is a simple and common use case.
Also validating for max OP_RETURN size since this is a difficult param for devs to find if they are not intimately familiar with the eCash codebase.
Test Plan: npm test
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D14075