This commit separate the transaction signing code into sign.go and the related tests into sign_test.go.