Switch away from exceptions in refactored tx code
Summary:
After refactoring general-purpose PSBT and transaction code out of RPC code, for use in the GUI, it's no longer appropriate to throw exceptions. Instead we now return bools for success, and take an output parameter for an error object. We still use JSONRPCError() for the error objects, since only RPC callers actually care about the error codes.
Partial backport of core PR14978:
https://github.com/bitcoin/bitcoin/pull/14978/commits/bd0dbe8763fc3029cf96531c9ccaba280b939445
Test Plan:
ninja all check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5739