This PR makes it possible to call FundRawTransaction with pre filled inputs not belonging to the wallet. This is very useful for AnyOneCanPay scenario, where one of a third party only cover part of a transaction.
The necessary information to complete the transaction is taken from of the mempool and coinview.
A typical example would involves Alice and Bob wanting to fund 0.5 each to the payment channel. Alice would give her input, and Bob would be able to complete the missing amount via FundRawTransaction.
A follow up PR will allow the client fundrawtransaction to pass previous TxOuts corresponding to the inputs. This is necessary for filling transaction in some 2nd layer protocols, where the the inputs's of the transaction to fund have not yet been broadcasted.
This supersede my previous attempt at #10068 which I closed, as it was harder to review.
The first two commits are strict refactoring. The third is the one checking information in the coinview. Rest is about tests.