Abstract out Ctransaction-specific signing into SignatureCreator

Uses ideas from @jtimon's #4694/#4695/#4989, to build an abstraction class BaseSignatureCreator that doesn't depend on the data type being signed, and a SignatureCreator specific to CTransaction's.