Encode and decode addresses with a btcwire.BitcoinNet, not a byte.

While here, fix a couple of append() leaks.