Add cpu profile to kvstore

Change-Id: Icc27298fc35db22cd1c2036c8d77ef4e75111c67
Fix go-1.2 build

Change-Id: I9e298845ea311808bd28b6c146e3a4847d7b6ab9
Add size delimited encoder for raftpb

Protocol buffer cannot marshall messages in a stream. This commits adds
a size delimited encoder and its decoder with an API similar to gob.

Change-Id: I79abbdda4b8deb613a11e03b423ec02fb2c74c76
Add Errorf to gob errors

Change-Id: I527a2300f77834f32d4749dcca96fbcff464d612
Make partial read a full read in raft decoder

Change-Id: I8294e753391658ee96df21444917b1ee183bf920
Add streaming, loadbalancing and batching

This commits adds an initial version for streaming messages between
hives. We have a streamer that can load balance messages and we have a
batcher that batch messages for better performance.

Change-Id: I70676bc01644213a8b8e5abe897f5d2cbc5c129b
Fix glog import in the kvstore

Change-Id: I02f159f616c2647c131a93895865a87826f6a85e
Remove connpool

Change-Id: Ibbf33bb06e9223ce39f5e7f63f3e4e1b3f555bee
Optimization and fixes in server

Details:
- Send bee commands directly to bees
- Initialize cmd for every decoding step

Change-Id: I52e2fa8554bfeb80062f5dbc9dc1ee7bbd1c076e
Simplify Queen's handleCmd

This commit simplifies Queen's handleCmd with a generic type switch.

Change-Id: I0e5436e09766ee5c071eca1c06e0571dcfae6bf0
Add timeout for replication and raft node

Under a heavy load, there is a possbility that a raft node cannot start
or a transaction cannot replicate in time. We add a timeout for both of
these cases to mitigate the affect of stressing the platform.

Change-Id: I69b9400414634447c018881403d9aef7ae58d2fe
Ignore *.out

Change-Id: I8f10846a44ad723fe76a3e42bb651f9226c8018f
Use golang.org/x/net/context

Change-Id: Ic39ed3e04aae3c2f4c8cdf55a5ceff4e53ff8066
Upgrade to the latest etcd raft

Change-Id: Iefe69035fb0a7e5d37befe8c1d6c97a5d0b1cd70