Implement Error interface for TxError and move to error.go

This PR implements the `Error` interface for type `TxError`, per #57 by @bruth; and moves types `TxError` and `TxQueryError` to file `error.go`.