Optimize writeVarString.
Optimize writeVarString.

Before:

BenchmarkWriteVarStr4    1000000              1114 ns/op
BenchmarkWriteVarStr10   1000000              1352 ns/op

After:

BenchmarkWriteVarStr4    5000000               291 ns/op
BenchmarkWriteVarStr10  10000000               248 ns/op

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

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