add encoding speed test and gofmt

The test encodes and decodes simple log entries. The total size is about 150kb. On my machine, it took about 40ms on average including encoding and decoding.

I am going to add an index to AE response, to help the leader decide the prevIndex of the peer.