Optimize writeTxIn.

Before: BenchmarkWriteTxIn       5000000               422 ns/op
After:  BenchmarkWriteTxIn       5000000               389 ns/op

This is part of the ongoing effort to optimize serialization as noted in
conformal/btcd#27.
Add benchmarks for transaction Serialize.

This commit adds a benchmark for the MsgTx.BtcEncode/Serialize functions.
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.