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.