Factor out combine / finalize / extract PSBT helpers
Summary:
Refactor the new CombinePSBT, FinalizePSBT, and FinalizeAndExtractPSBT general-purpose functions out of the combinepsbt and finalizepsbt RPCs, for use in the GUI code.
Completes backport of core PR14978:
https://github.com/bitcoin/bitcoin/pull/14978/commits/102faad81efa1cb12c29c466cfe81fc8c7351e1d
Depends on D5739.
Test Plan:
ninja all check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5740