Stores pubkeys in SignatureData and retrieves them when using GetPubKey().
Stores whether the signatures in a SignatureData are for a witness input.
This is a partial backport of Core PR13557 : https://github.com/bitcoin/bitcoin/pull/13557/commits/12bcc64f277f642ece03c25653e726f2276f0d51
Depends on D4258