fun checkAndAddSignature(sig: WithKey): UnitChecks that the given signature matches one of the commands and that it is a correct signature over the tx, then adds it.
SignatureException - if the signature didnt match the transaction contentsIllegalArgumentException - if the signature key doesnt appear in any command.