[ecash-herald] Add basic validation checks to make app robust against unexpectedly formed OP_RETURN txs
Summary: It would be possible to crash ecash-herald by using known protocol identifiers to create OP_RETURN stacks of unexpected shape. Stop treating spec (including some unwritten spec) as natural law.
Test Plan: npm test
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D14210