Optimize transaction Serialize.
Optimize transaction Serialize.

The benchmark results for the current commit:

Before: BenchmarkSerializeTx     1000000              1233 ns/op
After:  BenchmarkSerializeTx     1000000              1083 ns/op

The cumulative benchmark results since commit b7b700fd5aebb86addc93efecaa367a2f4976058:

Before: BenchmarkSerializeTx     1000000              5437 ns/op
After:  BenchmarkSerializeTx     1000000              1083 ns/op

This is part of the ongoing effort to optimize serialization as noted in
conformal/btcd#27.

toddfries/btcd,jcmincke/dcrd,runeaune/btcd,FactomProject/btcd,qchain/btcd,stevenroose/btcd,btcsuite/btcd,jrick/btcd,jimmysong/btcd,ppcsuite/ppcd,ltcsuite/ltcd,1d4Nf6/btcd,CryptocurrencyCabal/htcd,toddfries/btcd,jcmincke/dcrd,soapboxsys/ombfullnode,davecgh/btcd,jcmincke/dcrd,Roasbeef/btcd,wallclockbuilder/btcd,hectorj/btcd,jimmysong/btcd,stevenroose/btcd,Cleawing/btcd,Dirbaio/btcd,cqswxj2013/btcd,Cleawing/btcd,tb00/btcd,adiabat/btcd,soapboxsys/ombfullnode,Roasbeef/btcd,btcsuite/btcd,dan-da/btcd,ppcsuite/ppcd,dan-da/btcd,jrick/btcd,glv2/ppcd,Stash-Crypto/btcd,Stash-Crypto/btcd,wallclockbuilder/btcd,CryptocurrencyCabal/htcd,DanielKrawisz/btcd,BitGo/prova,pkothbauer/btcd,DanielKrawisz/btcd,danoctavian/btcd,glv2/ppcd,decred/dcrd,BitGo/prova,mathiasrw/btcd,aakselrod/btcd,1d4Nf6/btcd,btcsuitereleases/btcd,jongillham/btcd,cqswxj2013/btcd,hectorj/btcd,cjepson/btcd,pkothbauer/btcd,dajohi/btcd,jrick/dcrd,FactomProject/btcd,tb00/btcd,Dirbaio/btcd,adiabat/btcd,aakselrod/btcd,dajohi/btcd,qchain/btcd,runeaune/btcd,btcsuitereleases/btcd,jrick/btcd,cjepson/btcd,danoctavian/btcd,davecgh/btcd,ltcsuite/ltcd,dajohi/btcd,jrick/dcrd,Dirbaio/btcd,jongillham/btcd,mathiasrw/btcd,decred/dcrd,ppcsuite/ppcd-old,ppcsuite/ppcd-old