Move most of txToPairs into a new createTx func

That new function can be easily tested because it doesn't need a
Wallet instance.
All exported errors in Go should start with Err.  This is standard style and golint will even complain if it's not followed.