Refactor the analyzepsbt RPC into (1) an AnalyzePSBT function, which returns
its output as a new strongly-typed PSBTAnalysis struct, and (2) a thin wrapper
which converts the struct into a UniValue for RPC use.
https://github.com/bitcoin/bitcoin/pull/15508/commits/ef22fe8c1f331b4f13f21a54d12030b92e83fbe7
Depends on D6077
This is a partial backport of Core PR15508