[ecash-lib] Add toHex method to Script class
Summary: I find myself frequently needing to do this manually, i.e. toHex(someScript.bytecode) ... it is simple enough manually but I also find myself always forgetting about .bytecode. Might as well have this in the lib.
Test Plan: npm test
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: tobias_ruck, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17527