[ecash-lib] Use new Error when throwing errors in WriterBytes
Summary: Currently we throw strings directly, and node refuses to give us a stack trace in this case and tells us to use Error instead, so we do that.
Test Plan: npm run test
Reviewers: bytesofman, #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16740